Last data update: 2014.03.03

R: Difftime with units Months and Years
as.difftimeR Documentation

Difftime with units Months and Years

Description

Expand difftime units to include months and years .

Usage

as.difftime(tim, format = "%X", units = "auto")

Arguments

tim
format
units

Anything allowed by base:::as.difftime. In addition, can be "months" or "years" in which case tim must be numeric.

Details

Primarily used to facilitate adding months and years to mondates. See base:::as.difftime.

Value

See base:::as.difftime.

Author(s)

Dan Murphy.

See Also

Base as.difftime

Examples

x <- mondate(0:12)
y <- as.difftime(1, , "months")
x + y
x - y

Results