Learn R Programming

TSstudio (version 0.1.7)

ts_to_prophet: Transform Time Series Object to Prophet input

Description

Transform a time series object to Prophet data frame input format

Usage

ts_to_prophet(ts.obj, start = NULL)

Value

A data frame object

Arguments

ts.obj

A univariate time series object of a class "ts", "zoo", "xts", with a daily, weekly, monthly , quarterly or yearly frequency

start

A date object (optional), if the starting date of the series is known. Otherwise, the date would be derive from the series index

Examples

Run this code

data(USgas)

ts_to_prophet(ts.obj = USgas)

# If known setting the start date of the input object

ts_to_prophet(ts.obj = USgas, start = as.Date("2000-01-01"))

Run the code above in your browser using DataLab