On Fri, Mar 13, 2015 at 11:36 AM, Kumsaa waddee...@gmail.com wrote:
How could I extract both month and year from a date? I know how to
separately extract both using lubridate package:
df$month - month(df$date)
df$year- year(df$date)
I wish to extract year and month as one column
How could I extract both month and year from a date? I know how to
separately extract both using lubridate package:
df$month - month(df$date)
df$year- year(df$date)
I wish to extract year and month as one column
dput(mydf)
structure(list(date = structure(c(14975, 14976, 14977, 14978,
14979,
On Mar 13, 2015, at 8:36 AM, Kumsaa wrote:
How could I extract both month and year from a date? I know how to
separately extract both using lubridate package:
df$month - month(df$date)
df$year- year(df$date)
Use format.Date: # and see ?strptime for more format specifications.
3 matches
Mail list logo