You can use paste
to paste the day with the ‘Date’ column, convert to Date
class using as.Date
with the appropriate format
argument.
df1$Date <- as.Date(paste(df1$Date, '01'), '%Y %B %d')
For more info, you can check ?as.Date
, ?strptime
, ?as.POSIXct
1
solved Converting a year-month column to date type [duplicate]