split_in_folds: Split n items into k folds

View source: R/resample_cv.R

split_in_foldsR Documentation

Split n items into k folds

Description

Split n items into k folds

Usage

split_in_folds(n, k)

Arguments

n

integer, the number of items.

k

integer, the number of folds.

Value

A vector of length n, containing a integer in 1:k = the fold identifier

Examples

jihoml:::split_in_folds(k=3, n=10)
table(jihoml:::split_in_folds(k=3, n=100))

jiho/joml documentation built on Dec. 6, 2023, 5:50 a.m.