Description Usage Arguments Note Examples

Methods to get and set the `timeunits`

value of a `mondate`

.

1 2 3 4 5 6 |

`x` |
a |

`value` |
For the "get" method,
a "months" "years" "days"
If |

The `mondateTimeunits`

versions have been deprecated.

1 2 3 4 5 6 7 8 9 10 11 | ```
x <- mondate("2010-6-30") # The middle of 2010
timeunits(x) # "months"
y <- x + 12 # One year (12 months) later.
timeunits(y) # "months"
y - x # Result is 12 months
timeunits(y) <- "years"
y - x # Result is 1 year, with a warning because
# x@timeunits != y@timeunits. Units of result
# comes from the first argument.
timeunits(y) <- "days"
suppressWarnings(y - x) # Result is 365 days -- warning suppressed
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.