# NOT RUN {
library(mlr3)
task = tsk("cookfarm")
# Instantiate Resampling
rcv = rsmp("sptcv_cstf",
folds = 5,
time_var = "Date", space_var = "SOURCEID")
rcv$instantiate(task)
# Individual sets:
rcv$train_set(1)
rcv$test_set(1)
# check that no obs are in both sets
intersect(rcv$train_set(1), rcv$test_set(1)) # good!
# Internal storage:
rcv$instance # table
# }
Run the code above in your browser using DataLab