kfold: k-fold partition of data at random

View source: R/extlasso.R

kfoldR Documentation

k-fold partition of data at random

Description

The function partitions a data set into k folds of equal sizes at random.

Usage

kfold(data1,k)

Arguments

data1

A matrix.

k

Number of folds

Details

This function is internal and used by cross validation routines.

Value

A matrix with fold identification in first column.

Author(s)

B N Mandal and Jun Ma

Examples

data=matrix(rnorm(10*4),10,4)
kfold(data,3)

extlasso documentation built on May 13, 2022, 9:08 a.m.

Related to kfold in extlasso...