dot-randomSampleIndex: Generate a random sample from each group

Description Usage Arguments Value

Description

Returns a list of equally size random samples from two or more sample groupings.

Usage

1

Arguments

n

The sample size

labels

A vector of the group labels for all rows of the

groups

A vector of group labels for the data to sample from

numSamples

The number of samples to take

Value

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.


bhklab/PDATK documentation built on Dec. 27, 2021, 7:46 a.m.