oobianom / quickcode

An R package made out of mine and Brice's scrapbook of much needed functions.
https://quickcode.obi.obianom.com
Other
5 stars 0 forks source link

fAddDate Fails When Referencing a Variable #23

Closed brichard1638 closed 6 months ago

brichard1638 commented 7 months ago

The fAddDate function fails when the file name to which it is referenced originates from a variable contained in a data frame object.

Expected Behavior: The fAddDate function should correctly process scaler and vector inputs. Variable data originating from within a data frame object should also be included as an input. In its current form, a variable reference return incorrect output.

The code below reproduces the error defining this issue: library(quickcode) data("USArrests") USArrests$fn = paste0(row.names(USArrests), ".txt") head(fAddDate(USArrests$fn),2)

oobianom commented 7 months ago

Thanks Brice. I will get to this and the rest of our unresolved issues a bit later. I am extremely busy this month.

brichard1638 commented 7 months ago

Feel free to reach out if you are having a challenge at work that might require an R response.

There are actually a few pharmacokinetic-based packages found in R. They are as follows:

clinPK: Clinical Pharmacokinetics Toolkit wnl: Minimization Tool for Pharmacokinetic-Pharmacodynamic Data Analysis * ncar: Noncompartmental Analysis for Pharmacokinetic Report


From: Obi Obianom @.> Sent: Sunday, April 14, 2024 7:33 PM To: oobianom/quickcode @.> Cc: brichard1638 @.>; Author @.> Subject: Re: [oobianom/quickcode] fAddDate Fails When Referencing a Variable (Issue #23)

Thanks Brice. I will get to this and the rest of our unresolved issues a bit later. I am extremely busy this month.

— Reply to this email directly, view it on GitHubhttps://github.com/oobianom/quickcode/issues/23#issuecomment-2054221293, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASLI5UI337BQ5T5UO66YAA3Y5MG5LAVCNFSM6AAAAABF3ZPPHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGIZDCMRZGM. You are receiving this because you authored the thread.Message ID: @.***>

oobianom commented 6 months ago

I am resuming work on this package again this weekend

brichard1638 commented 6 months ago

Great:::

I have put another idea for you to consider by way of a new function.


From: Obi Obianom @.> Sent: Friday, May 3, 2024 6:50 PM To: oobianom/quickcode @.> Cc: brichard1638 @.>; Author @.> Subject: Re: [oobianom/quickcode] fAddDate Fails When Referencing a Variable (Issue #23)

I am resuming work on this package again this weekend

— Reply to this email directly, view it on GitHubhttps://github.com/oobianom/quickcode/issues/23#issuecomment-2093857759, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASLI5UL3GWIG5KX5GIEX4BTZAQIBRAVCNFSM6AAAAABF3ZPPHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTHA2TONZVHE. You are receiving this because you authored the thread.Message ID: @.***>

oobianom commented 6 months ago

This is now resolved and the repository in now updated. Brice take a look when you have some time, Thanks.

brichard1638 commented 6 months ago

Awesome job!

The fAddDate function has passed all the tests under which it was evaluated. This includes both a vector and a variable test.

In addition, a formatting test was conducted which included characters exclusive of date-based R formatting parameters. For example, encapsulating an open and closed parenthesis within the date. The function also passed that test.

oobianom commented 6 months ago

Thanks Brice, great we fix issues with this function. I use it almost daily now in my scripts.