Tidy summarizes information about the components of a model. A model component might be a single term in a regression, a single hypothesis, a cluster, or a class. Exactly what tidy considers to be a model component varies cross models but is usually self-evident. If a model has several distinct types of components, you will need to specify which components to return.
# S3 method for ts tidy(x, ...)
x | A univariate or multivariate |
---|---|
... | Additional arguments. Not used. Needed to match generic
signature only. Cautionary note: Misspelled arguments will be
absorbed in |
A tibble::tibble with one row for each observation and columns:
Index (i.e. date or time) for the "ts" object.
Name of the series (multivariate "ts" objects only).
Value of the observation.
#> # A tibble: 10 x 2 #> index value #> <dbl> <int> #> 1 1959. 1 #> 2 1960. 2 #> 3 1960. 3 #> 4 1960 4 #> 5 1960. 5 #> 6 1960. 6 #> 7 1961. 7 #> 8 1961 8 #> 9 1961. 9 #> 10 1962. 10z <- ts(matrix(rnorm(300), 100, 3), start = c(1961, 1), frequency = 12) colnames(z) <- c("Aa", "Bb", "Cc") tidy(z)#> # A tibble: 300 x 3 #> index series value #> <dbl> <chr> <dbl> #> 1 1961 Aa -0.773 #> 2 1961. Aa 0.933 #> 3 1961. Aa 0.466 #> 4 1961. Aa -1.08 #> 5 1961. Aa -2.16 #> 6 1961. Aa -0.719 #> 7 1962. Aa 1.04 #> 8 1962. Aa 0.545 #> 9 1962. Aa -0.606 #> 10 1962. Aa 0.774 #> # … with 290 more rows