ts_to_prophet: Transform Time Series Object to Prophet input

View source: R/util_functions.R

ts_to_prophetR Documentation

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)

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

Value

A data frame object

Examples


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"))


TSstudio documentation built on Aug. 9, 2023, 9:06 a.m.