| time_cycle | R Documentation |
This S7 generic function extracts the cycle (the cyclical time granule) from a time object, such as cyclical time representations.
time_cycle(x, ...)
x |
A time object (e.g., base::Date, base::POSIXct, |
... |
Additional arguments for methods. |
A time duration() object representing the cycle of each value
(e.g. weeks(1L)), or NA if the object has no cyclical component.
# Non-cyclical objects return NA
time_cycle(Sys.Date())
# The cycle of a cyclical time object
time_cycle(month_of_year(Sys.Date()))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.