I want to combine two variables into one with a date format
问题 I have a data set with a character column for months ( MONTH ) and a numeric column indicating years ( YEAR ). In order to work with it as panel data, I need to unite these YEAR and MONTH into a variable with a date format. I have tried to change the variable MONTH to numeric format and then to merge MONTH with the column YEAR . R would not recognize it as a date variable. It currently looks like this: STATE MONTH YEAR VALUE California JAN 2018 800 California FEB 2018 780 California MAR 2018