.randomSampleIndex {PDATK} | R Documentation |
Returns a list of equally size random samples from two or more sample groupings.
.randomSampleIndex(n, labels, groups)
n |
The sample size |
labels |
A |
groups |
A vector of group labels for the data to sample from |
numSamples |
The number of samples to take |
A subset of your object with n random samples from each group in groups. The number of rows returned will equal the number of groups times the sample size.