This function takes in a time-series object and returns it in a
tibble
format.
Details
This function makes use of timetk::tk_tbl()
under the hood to obtain
the initial tibble
object. After the inital object is obtained a new column
called date_col
is constructed from the index
column using lubridate
if
an index column is returned.
See also
Other Utility:
auto_stationarize()
,
calibrate_and_plot()
,
internal_ts_backward_event_tbl()
,
internal_ts_both_event_tbl()
,
internal_ts_forward_event_tbl()
,
model_extraction_helper()
,
ts_get_date_columns()
,
ts_info_tbl()
,
ts_is_date_class()
,
ts_lag_correlation()
,
ts_model_auto_tune()
,
ts_model_compare()
,
ts_model_rank_tbl()
,
ts_model_spec_tune_template()
,
ts_qq_plot()
,
ts_scedacity_scatter_plot()
,
util_difflog_ts()
,
util_doublediff_ts()
,
util_doubledifflog_ts()
,
util_log_ts()
,
util_singlediff_ts()
Examples
ts_to_tbl(BJsales)
#> # A tibble: 150 × 1
#> value
#> <dbl>
#> 1 200.
#> 2 200.
#> 3 199.
#> 4 199.
#> 5 199
#> 6 200.
#> 7 199.
#> 8 200
#> 9 200.
#> 10 201.
#> # ℹ 140 more rows
ts_to_tbl(AirPassengers)
#> # A tibble: 144 × 3
#> index date_col value
#> <yearmon> <date> <dbl>
#> 1 Jan 1949 1949-01-01 112
#> 2 Feb 1949 1949-02-01 118
#> 3 Mar 1949 1949-03-01 132
#> 4 Apr 1949 1949-04-01 129
#> 5 May 1949 1949-05-01 121
#> 6 Jun 1949 1949-06-01 135
#> 7 Jul 1949 1949-07-01 148
#> 8 Aug 1949 1949-08-01 148
#> 9 Sep 1949 1949-09-01 136
#> 10 Oct 1949 1949-10-01 119
#> # ℹ 134 more rows