kfold {nnlasso} | R Documentation |
The function partitions a data set into k folds of equal sizes at random.
kfold(data1,k)
data1 |
A matrix. |
k |
Number of folds |
This function is internal and used by cross validation routines.
A matrix with fold identification in first column.
Baidya Nath Mandal and Jun Ma
data=matrix(rnorm(10*4),10,4)
kfold(data,3)