stratSample function

Sample stratified indices according to a factor variable

Sample stratified indices according to a factor variable

stratSample(f)

Arguments

  • f: A factor variable

Returns

A vector of the same length as f, containing the resampled indices, stratified according to the levels of f