Learn R Programming

vetools (version 1.3-28)

time2ym: Time related conversion functions

Description

These functions convert between class "Date" and c(year, month) dates.

Usage

time2ym(d) ym2time(e)

Arguments

d
object of class "Date" that can be converted to c(year, month)
e
object of class "ts"

Value

time2ym
returns a vector of length 2 specifying year and month corresponding to a date given, compatible with commands start and end for objects of class "ts"
ym2time
returns a class "Date" object determined by the specified year and month

See Also

vetools, diffmonths, tssum, diasdelmes, xts2ts.