I have dataframe with 2 date columns (year and month) and I would like to merge them into 1 (I will use that column in plotting x-axis).
How can I merge them so values in it will look like "1990-03"
structure(list(Year = c(1983, 1983, 1983, 1983, 1983, 1983),
Month = c(5, 6, 7, 8, 9, 10), MEI = c(2.556, 2.167, 1.741,
1.13, 0.428, 0.002), CO2 = c(345.96, 345.52, 344.15, 342.25,
340.17, 340.3), CH4 = c(1638.59, 1633.71, 1633.22, 1631.35,
1648.4, 1663.79), N2O = c(303.677, 303.746, 303.795, 303.839,
303.901, 303.97), CFC.11 = c(191.324, 192.057, 192.818, 193.602,
194.392, 195.171), CFC.12 = c(350.113, 351.848, 353.725,
355.633, 357.465, 359.174), TSI = c(1366.1024, 1366.1208,
1366.285, 1366.4202, 1366.2335, 1366.0589), Aerosols = c(0.0863,
0.0794, 0.0731, 0.0673, 0.0619, 0.0569), Temp = c(0.109,
0.118, 0.137, 0.176, 0.149, 0.093)), row.names = c(NA, 6L
), class = "data.frame")
I was trying some methods but keep getting NA