[R] strange date problem - May 3, 1992 is NA
Alexander Shenkin
ashenkin at ufl.edu
Wed Jun 22 17:40:44 CEST 2011
> is.na(strptime("5/2/1992", format="%m/%d/%Y"))
[1] FALSE
> is.na(strptime("5/3/1992", format="%m/%d/%Y"))
[1] TRUE
Any idea what's going on with this? Running strptime against all dates
from around 1946, only 5/3/1992 was converted as "NA". Even stranger,
it still seems to have a value associated with it (even though is.na
thinks it's NA):
> strptime("5/3/1992", format="%m/%d/%Y")
[1] "1992-05-03"
Thanks,
Allie
R
More information about the R-help
mailing list