# NOT RUN {
library(tidyverse)
library(timetk)
# DATA ----
m750 <- m4_monthly %>% filter(id == "M750")
m750 %>% plot_time_series(date, value)
# RESAMPLE SPEC ----
resample_spec <- time_series_cv(data = m750,
initial = "6 years",
assess = "24 months",
skip = "24 months",
cumulative = FALSE,
slice_limit = 3)
resample_spec
# VISUALIZE CV PLAN ----
# Select date and value columns from the tscv diagnostic tool
resample_spec %>% tk_time_series_cv_plan()
# Plot the date and value columns to see the CV Plan
resample_spec %>% plot_time_series_cv_plan(date, value, .interactive = FALSE)
# }
Run the code above in your browser using DataLab