MSD_to_YM {SeaVal}R Documentation

Converts time given as 'months since date' (MSD) into years and months (YM)

Description

Converts time given as 'months since date' (MSD) into years and months (YM)

Usage

MSD_to_YM(dt, timecol = "time", origin = "1981-01-01")

Arguments

dt

a data table.

timecol

name of the column containing the time.

origin

The time column contains time in the format month since which date?

Value

data table with two new columns 'month' and 'year', the timecol is deleted.

Examples

dt = MSD_to_YM(data.table(time = 0:12))

[Package SeaVal version 1.2.0 Index]