R/time2ym.R

Defines functions time2ym

Documented in time2ym

# Verified 1.3.18
time2ym <-
function(d) {
        if ( !("Date" %in% class(d)) ) { stop("Not a Date class object") }
        return(c(as.numeric(format(d, format=c("%Y"))), as.numeric(format(d, format=c("%m")))))
}

Try the vetools package in your browser

Any scripts or data that you put into this service are public.

vetools documentation built on May 2, 2019, 10:15 a.m.