Learn R Programming

caretForecast (version 0.1.3)

split_ts: Split a time series into training and testing sets

Description

Split a time series into training and testing sets

Usage

split_ts(y, test_size = 10)

Value

A list with train and test elements

Arguments

y

A univariate time series

test_size

The number of observations to keep in the test set

Author

Resul Akay

Examples

Run this code

dlist <- split_ts(retail_wide[,1], test_size = 12)

Run the code above in your browser using DataLab