I have data of date and I want to extract the month's name and its year:
>head(merged.tables$Date)
2015-07-31
2013-01-12
2014-01-03
2014-12-03
2013-11-13
2013-10-27
In other word I need to get the result arranged in ascending order like this:
January_2013
October_2013
November_2013
January_2014
December_2014
July_2015
So I tried to use this code to convert first as shown in the code above.
merged.tables$Date <-paste(months(as.Date(merged.tables$Date)),year(as.Date(merged.tables$Date)),sep="_")
But It show me this error:
Error in charToDate(x) : character string is not in a standard unambiguous format
I tried to adapt this solution character string is not in a standard unambiguous format. But I can't resolve it!
Thank you for your help