Assuming regularly spaced time, the pull_interval()
returns a list of time
components as the "interval" class.
pull_interval(x)
A vector of POSIXt
, Date
, yearmonth
, yearquarter
, difftime
,
hms
, integer
, numeric
.
an "interval" class (a list) includes "year", "quarter", "month", "week", "day", "hour", "minute", "second", "millisecond", "microsecond", "nanosecond", "unit".
index_valid()
and pull_interval()
make a tsibble extensible to
support custom time index.
# NOT RUN {
x <- seq(as.Date("2017-10-01"), as.Date("2017-10-31"), by = 3)
pull_interval(x)
# }
Run the code above in your browser using DataLab