| ts_to_df | R Documentation |
Converts a ts object into a tibble with two columns: date
and value. Optionally, the columns can be renammed using date_col and
value_col.
ts_to_df(x, date_col = NULL, value_col = NULL)
x |
A time series as a |
date_col |
Name for the date column. Defaults to '"date"“. |
value_col |
Name for the value column. Defaults to |
a tibble
# example code
ts_to_df(AirPassengers)
# Using a custom name for the value column
ts_to_df(AirPassengers, value_col = "passengers")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.