powered by
Convert time series to tibble
ts_to_df(x, date_colname = NULL, value_colname = NULL)
a tibble
tibble
A time series as a ts object
ts
Optional name for the date column
Optional name for the value column
# example code ts_to_df(AirPassengers) # Using a custom name for the value column ts_to_df(AirPassengers, value_colname = "passengers")
Run the code above in your browser using DataLab