Skip to content
Prev 367298 / 398506 Next

converting time format

Sure:

df.count.mon$time<-format(as.Date(paste(df.count.mon$year,  df.count.mon$mon,1),
 '%Y %m %d'),"%Y %m")
count year mon    time
1     22 2014   1 2014 01
2     12 2014   2 2014 02
...

Jim
On Thu, Feb 23, 2017 at 8:18 AM, lily li <chocold12 at gmail.com> wrote: