Learn R Programming

trendseries (version 1.1.0)

ts_to_df: Convert time series to tibble

Description

Convert time series to tibble

Usage

ts_to_df(x, date_colname = NULL, value_colname = NULL)

Value

a tibble

Arguments

x

A time series as a ts object

date_colname

Optional name for the date column

value_colname

Optional name for the value column

Examples

Run this code
# 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