Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCondition handling for NA values #16
Comments
|
Yes, try the GH master branch which already does this: R> library(anytime)
R> anydate(c("20010101", "02/02/1902", NA, 20010203))
[1] "2001-01-01" "1902-02-02" NA "2001-02-03"
R> Should be on CRAN within days. |
|
But even with the existing version you can get by with pre-indexing. No need for lubdridate. |
|
I spoke too soon in regards to the master branch. That was still uncommitted on my box. It should still hit CRAN within days, I hope. |
Hello,
Are there any plans to change condition handling for
NAvalues so that their presence in a vector simply throws a warning versus an error? For instance...anydate(c("20010101", "02/02/1902", NA))... gives me the error:
Error in eval(substitute(expr), envir, enclos) : Inadmissable input: NAI have gotten around this issue of parsing date formats while accounting for the presence of
NAvalues by usinglubridate::parse_date_time(), but think that adding such functionality to your package, combined with its parsing flexibility (and the keystrokes saved by not having to specify theordersparameter inparse_date_time()) would make it an extremely attractive option for daily use.Thank you,
Mike