I have a data frame DF
which has a column Month
as a character string using the full English name of the month, and a column Year
as numeric:
Year Month {several xi}
2016 April {numeric}
I need to plot several of the xi as a time series. What is the most efficient way to sort this data frame from the earliest month (January 2015) to the present? My attempts to convert "month" into a date-classed object using as.Date
are not working as I'd like; they keep coming back sorted alphabetically.
Apologies if this is a noob question, but by sheer bad luck I have not had to work with date-class objects very often in my R career, so I'm not sure which of the various similar questions I am seeing can help me.