Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tk_time_series_cv_plan

Time Series Resample Plan Data Preparation


Description

The tk_time_series_cv_plan() function provides a simple interface to prepare a time series resample specification (rset) of either rolling_origin or time_series_cv class.

Usage

tk_time_series_cv_plan(.data)

Arguments

.data

A time series resample specification of of either rolling_origin or time_series_cv class.

Details

Resample Set

A resample set is an output of the timetk::time_series_cv() function or the rsample::rolling_origin() function.

See Also

Examples

library(tidyverse)
library(tidyquant)
library(rsample)
library(timetk)

FB_tbl <- FANG %>%
    filter(symbol == "FB") %>%
    select(symbol, date, adjusted)

resample_spec <- time_series_cv(
    FB_tbl,
    initial = 150, assess = 50, skip = 50,
    cumulative = FALSE,
    lag = 30,
    slice_limit = n())

resample_spec %>% tk_time_series_cv_plan()

timetk

A Tool Kit for Working with Time Series in R

v2.6.1
GPL (>= 3)
Authors
Matt Dancho [aut, cre], Davis Vaughan [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.