classVal: A vector of factors representing class values.
lst: A list of lists from which we collect results of the same components.
Details
The functions cvGen and cvGenStratified generate indices of instances from a data set which can be used in cross-validation. The function cvGenStratified generates the same distribution of class values in each fold. The function gatherFromList is an auxiliary function helping in collection of results, see the example below.
Returns
The functions cvGen and cvGenStratified return a vector of indices indicating fold membership i.e. from 1:k. The function gatherFromList returns a list with components containing elements of the same name.