Learn R Programming

extlasso (version 0.3)

fold: Particular fold of a data after k fold partition

Description

The function returns a particular fold after k-fold partitioning by kfold function.

Usage

fold(data1,k,i)

Arguments

data1

A matrix.

k

Number of folds

i

The fold to be returned

Value

A matrix with desired fold specified.

Details

This function is internal and used by cross validation routines.

Examples

Run this code
# NOT RUN {
data=matrix(rnorm(10*4),10,4)
kfold(data,3)
fold(data,3,2)
# }

Run the code above in your browser using DataLab