Transform ts to tibble

ts_2_tibble(ts_data)

Arguments

ts_data

ts object

Value

tsibble

Details

Transform ts to tibble. The function takes univariate or multivariate time series and transforms them to a tibble with a separate column indicating a period of time. Column with dates is called "date".

Examples

test_ts = stats::ts(rnorm(100), start = c(2000, 1), freq = 12) ts_2_tibble(test_ts)
#> # A tibble: 100 x 2 #> date value #> <mth> <dbl> #> 1 2000 янв 1.98 #> 2 2000 фев -2.23 #> 3 2000 мар 1.15 #> 4 2000 апр -1.18 #> 5 2000 мая -1.16 #> 6 2000 июн 1.03 #> 7 2000 июл 0.695 #> 8 2000 авг -1.09 #> 9 2000 сен 0.337 #> 10 2000 окт -0.453 #> # … with 90 more rows