find.division.not.strat: Random partitioning of input data

Description Usage Arguments Value See Also Examples

View source: R/find.division.not.strat.R

Description

Function to determine a random partition of the input vector into a specifiend number of folds.

Usage

1

Arguments

vett

vector to be partitioned

n_fold

number of folds in which the argument vett must be partitioned

Value

List with n_fold elements, the i-th element is a vector corresponding to i-th fold.

See Also

find.division.strat

Examples

1
2
3
4
5
6
7
n <- 100;
vett <- runif(n, 0, 1);
n_fold <- 5;
fold_list <- find.division.not.strat(vett, n_fold);
length(fold_list);
## indices of the first fold 
fold_list[[1]];

COSNet documentation built on Nov. 8, 2020, 8:12 p.m.