Create contiguous time folds
make_time_folds.Rd
Split unique time points into contiguous blocks, returning row indices for each fold.
Examples
df <- data.frame(t = rep(1:10, each = 2))
make_time_folds(df, K = 2)
#> $`1`
#> [1] 1 2 3 4 5 6 7 8 9 10
#>
#> $`2`
#> [1] 11 12 13 14 15 16 17 18 19 20
#>