Dear R Experts,
I have a vector of dates in character format like this:
date
"2000-01-01"
"2000-01-23"
"2001-03-12"
...
...
...
"2009-12-31"
I would like to delete the last part of the character string (i.e. the
"day" part), so the vector looks like this:
date
"2000-01"
"2000-01"
"2001-03"
...
...
...
"2009-03"
I have been looking into regular expressions, but i find this very
confusing.
Thank you for your help,
Thomas
______________________________________________
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.