as.difftime {mondate} | R 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 |
character string or numeric value specifying a time interval. |
format |
character specifying the format of tim: see strptime. The default is a locale-specific time format. |
units |
Anything allowed by as.difftime.
In addition, can be "months" or "years" in which case
|
Details
Primarily used to facilitate adding months and years to
mondate
s.
See as.difftime.
Value
See 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
[Package mondate version 1.0 Index]