Skip to content
Prev 344231 / 398498 Next

How to combine character month and year columns into one column

On Sep 23, 2014, at 10:41 AM, Kuma Raj <pollaroid at gmail.com> wrote:

            
Since you are trying to use ddf$month as an index into month.abb, you will either need to coerce ddf$month to numeric in your code, or adjust how the data frame is created.

In the case of the former approach:
[1] "Jan-1999" "Feb-1999" "Mar-1999" "Apr-1999" "May-1999" "Jun-1999"
 [7] "Jul-1999" "Aug-1999" "Sep-1999" "Oct-1999" "Nov-1999" "Dec-1999"


Regards,

Marc Schwartz