| is_time | R Documentation |
Test whether elements of a mixtime vector are linear, cyclical,
underspecified cyclical, or durations.
time_is_linear(x, ...)
time_is_cyclical(x, ...)
time_is_cyclical_free(x, ...)
time_is_duration(x, ...)
x |
A time object (typically a |
... |
Additional arguments for methods. |
These helpers return a logical vector the same length as x identifying the
type of time represented by each element. time_is_cyclical() and
time_is_cyclical_free() are distinct: located cyclical time (e.g.
month_of_year() of a real date) knows its enclosing cycle (which year),
while underspecified cyclical time (e.g. bare month_of_year(3)) doesn't.
See cyclical_time() for the differences.
A logical vector the same length as x.
t <- c(yearmonth(0), month_of_year(as.Date("2020-01-01")), months(0L))
time_is_linear(t)
time_is_cyclical(t)
time_is_duration(t)
time_is_cyclical_free(month_of_year(3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.