I want to make a Date sequence from 2010-04-01 to 2040-03-01, and express the date format to be "April-2010", or "Apr 2010". However, when I used as.yearmon() it only returned "4 2010" instead of "Apr 2010".
This is my first code which I tried to convert "2010-04-01" to the format of "Apr 2010", but the result of the code was "4 2010".
as.yearmon("2010-04-01", format = "%Y-%m-%d")
Also, I tried to make a sequence, but there happened an error (Error in del/by : non-numeric argument to binary operator)
seq(as.yearmon("2010-04-01"), as.yearmon("2040-03-01"), by = "1 month")
To sum up, I would like to make a sequence like below. Could you help me how can I do this?
"Apr 2010", "May 2010", "Jun 2010", ... , "Mar 2040"