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/PanCuRx documentation built on Dec. 30, 2021, 4:59 p.m.