Description Usage Arguments Details Value See Also Examples
Coerce to a funtsibble object
1 2 3 4 5 6 7 8 9 10 11 | as_funtsibble(x, key = NULL, funkey, index, regular = TRUE,
validate = TRUE, .drop = TRUE, ...)
## S3 method for class 'demogdata'
as_funtsibble(x, ..., validate = TRUE)
## S3 method for class 'fts'
as_funtsibble(x, ..., validate = TRUE)
## S3 method for class 'tbl_ts'
as_funtsibble(x, funkey, ..., validate = TRUE)
|
x |
Objects to be coerced to a funtsibble ('fun_tbl_ts'). |
key |
Unquoted variable(s) that uniquely determine time indices. 'c()' for multiple variables. It works with tidy selector (e.g. [dplyr::starts_with()]). |
funkey |
A subset of keys that define the functions. |
index |
A bare (or unquoted) variable to specify the time index variable. |
regular |
Regular time interval ('TRUE') or irregular ('FALSE'). The interval is determined by the greatest common divisor of index column, if 'TRUE'. |
validate |
'TRUE' suggests to verify that each key or each combination of key variables leads to unique time indices (i.e. a valid tsibble). If you are sure that it's a valid input, specify 'FALSE' to skip the checks. |
.drop |
If 'TRUE', empty key groups are dropped. |
... |
Other arguments passed on to individual methods. |
A funtsibble is sorted by any non-functional keys first, then functional keys and index.
A funtsibble object.
1 2 3 4 | # coerce demogdata object to funtsibble ----
as_funtsibble(demography::fr.mort)
# coerce fts object to funtsibble ----
as_funtsibble(rainbow::ElNino_ERSST_region_1and2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.