
Last chance! 50% off unlimited learning
Sale ends in
stable
new_interval()
creates an interval object.
is_regular_interval()
checks if the interval is regular.
new_interval(..., .regular = TRUE, .others = list())is_regular_interval(x)
A set of name-value pairs to specify default interval units: "year", "quarter", "month", "week", "day", "hour", "minute", "second", "millisecond", "microsecond", "nanosecond", "unit".
Logical. FALSE
gives an irregular interval, and will ignore
the ...
argument.
A list name-value pairs that are not included in the ...
,
to allow custom interval.
An interval.
an "interval" class
# NOT RUN {
(x <- new_interval(hour = 1, minute = 30))
(y <- new_interval(.regular = FALSE)) # irregular interval
new_interval() # unknown interval
new_interval(.others = list(semester = 1)) # custom interval
is_regular_interval(x)
is_regular_interval(y)
# }
Run the code above in your browser using DataLab