Hi I have a data frame (df
) that looks like:
Date
Jun.1
Jan.1
Jul.3
Mar.1
It's a character type.
Trying to use the lubridate package to convert to a date type. However, the closest thing I can find is mdy
which converts when the format is e.g. January 31st, 2017.
So, I tried to replace all the '.' to '' using gsub('.', '', df$date)
, but this just returns NAs.
Any advice?