powered by
Converts time given as 'months since date' (MSD) into years and months (YM)
MSD_to_YM(dt, timecol = "time", origin = "1981-01-01")
data table with two new columns 'month' and 'year', the timecol is deleted.
a data table.
name of the column containing the time.
The time column contains time in the format month since which date?
dt = MSD_to_YM(data.table(time = 0:12))
Run the code above in your browser using DataLab