How can I transform a date from the beggning of the period, to the final of the period in R language? Like follow:
Switch 2000-01-01 to 2000-12-01
Example:
df$date
date
2009-01-01
2010-01-01
2011-01-01
2012-01-01
.
.
.
Desired output:
df$date
date
2009-12-01
2010-12-01
2011-12-01
2012-12-01
.
.
.