[R] Parsing unusual date format
Shruthi Jayaram
shruthi.jayaram.85 at gmail.com
Thu Dec 18 11:15:04 CET 2008
Thanks so much everyone, these suggestions solve my problem in a very elegant
way.
A friend and I also came up with this "brute force" solution:
T <- c("1993m10")
y <- gsub("m.", "", T)
m <- gsub(".*m", "", T)
d <- paste(y,"-0",m,"-","01", sep="")
T <- as.Date(d, format="%Y-%m-%d")
Thought I would post it in any case.
Shruthi
--
View this message in context: http://www.nabble.com/Parsing-unusual-date-format-tp21067562p21069970.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list