[R] Separators in strptime---needed?
John Kane
jrkrideau at yahoo.ca
Wed Mar 23 23:22:52 CET 2011
For some reason I thought that I could read some text into dates without a separator? Am I wrong?
Examples
Works, it appears
ccc <- c("2011-04-07", "1989-10-12")
x <- strptime(ccc, "%Y-%m-%d")
Does not work
ddd <- c("20110407", "19891012")
y <- strptime(ccc, "%Y%m%d")
Does this mean I would have to parse the data in ddd and add separators?
Or am I missing some option in the help on strptime?
Thanks
More information about the R-help
mailing list