On Sun, 9 Mar 2014, Hermann Norpois wrote:
Hello,
I have some problems with as.Date.
strDates <- c ("01/05/1965", "08/16/1975")
dates <- as.Date (strDates, "%m/%d%/%Y")
^^^^
Instead of "%d%" just "%d":
R> as.Date(strDates, "%m/%d/%Y")
[1] "1965-01-05" "1975-08-16"
dates
[1] NA NA # I expected my dates. What was going wrong?
Thanks
Hermann
[[alternative HTML version deleted]]
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.