I have date stored as character
in the vector date
> head(date)
[1] "7-2014" "1-2018" "11-2014" "7-2014" "1-2018" "1-2018"
and want to convert it to date and find its minimum. I used as.Date
as explained here
as.Date(date, "%m-%Y")
but only get NA
as result. Why is this not working?
I want to find the minimum date in the column. If you know of a better approach, enlighten me :)