as.difftime | R Documentation |
Expand difftime units to include months and years .
as.difftime(tim, format = "%X", units = "auto")
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
|
Primarily used to facilitate adding months and years to
mondate
s.
See as.difftime.
See as.difftime.
Dan Murphy.
Base as.difftime
x <- mondate(0:12)
y <- as.difftime(1, , "months")
x + y
x - y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.