Hi,
Did you checked after removing "e" from "formate"?
ortho$test.dat <- as.Date(ortho$xray.date, formate="%d-%b-%y")
?
A.K.
----- Original Message -----
From: Liz Hare <doggene at earthlink.net>
To: r-help at r-project.org
Cc:
Sent: Tuesday, July 30, 2013 12:00 PM
Subject: [R] as.Date with characters error
Hello,
I'm trying to convert dates in the format dd-mmm-yy using as.Date.
I have two columns like this, and it works on one but not on the other.
Error in charToDate(x) :
? character string is not in a standard unambiguous format
sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
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? base
Does anyone have a guess about what's going on? I've googled for this
error but haven't found any where the problem is with this type of
conversion.
Thanks,
Liz