build_tsibble | R Documentation |
build_tsibble()
creates a tbl_ts
object with more controls. It is useful
for creating a tbl_ts
internally inside a function, and it allows developers to
determine if the time needs ordering and the interval needs calculating.
build_tsibble(
x,
key = NULL,
key_data = NULL,
index,
index2 = index,
ordered = NULL,
interval = TRUE,
validate = TRUE,
.drop = key_drop_default(x)
)
x |
A |
key |
Variable(s) that uniquely determine time indices. |
key_data |
A data frame containing key variables and |
index |
A variable to specify the time index variable. |
index2 |
A candidate of |
ordered |
The default of |
interval |
|
validate |
|
.drop |
If |
# Prepare `pedestrian` to use a new index `Date` ----
pedestrian %>%
build_tsibble(
key = !!key_vars(.), index = !!index(.), index2 = Date,
interval = interval(.)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.