-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
anydate sometimes yields NAs #70
Comments
Please see #67 which appears to be the same issue which I still cannot reproduce. Also preferably use current versions. R 3.3.2 is old. |
I take that back. User error. You cannot use single digit-months with the Boost parser. That is (as I recall) documented: > library(anytime)
> dv <-a <- c("3/22/2013 0:00", "3/21/2012 0:00", "2/19/2014 0:00", "12/5/2013 0:00",
+ "5/8/2013 0:00", "10/15/2010 0:00")
> dv
[1] "3/22/2013 0:00" "3/21/2012 0:00" "2/19/2014 0:00" "12/5/2013 0:00"
[5] "5/8/2013 0:00" "10/15/2010 0:00"
> anytime(dv)
[1] "2013-03-22 07:00:00 CET" "2012-03-21 00:00:00 CET"
[3] "2014-02-19 00:00:00 CET" NA
[5] NA "2010-10-15 00:00:00 CEST"
> anytime(dv, useR = TRUE)
[1] "2013-03-22 CET" "2012-03-21 CET" "2014-02-19 CET" "2013-12-05 CET"
[5] "2013-05-08 CEST" "2010-10-15 CEST"
> But we now have a fallback as shown. |
I tried setting the useR argument to TRUE but saw some weirdness. I'll have to update R and get back to you with my findings.
|
Fix your inputs. You may have missed the part where I said:
and there is nothing I can do about his. Sorry. |
Then I mis-understood your instruction to use the useR argument. I was under the impression that by setting useR = TRUE it would not use the Boost parser and therefore it would instead go via code from R (and which would be able to handle single digit-months). Thank you for your super-fast responses to my questions. |
Good news - this now works in master (and hence the next release probably at the end of the month):
|
Hi Dirk, for some input values I am getting NAs. Is this a bug?
Might be related to bug#33 which I reported before but was fixed SOv report
R version 3.3.2 (2016-10-31)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] anytime_0.3.0
loaded via a namespace (and not attached):
[1] tools_3.3.2 Rcpp_0.12.11 RApiDatetime_0.0.3
The text was updated successfully, but these errors were encountered: