sample_from_levels: Sample from levels of a factor

Description Usage Arguments Value

View source: R/cell_sampler.R

Description

Randomly select a specified number elements from each level (group) of a factor.

Usage

1

Arguments

x

A factor from whose levels should be sampled.

sizes

Number of elements that should be sampled from each level of x. Assumed to have the same length as the number of elements.

replace

Should samples be drawn with replacement?

Value

An numeric vector containing indices of the elements sampled from each level.


argschwind/dropseqr documentation built on May 23, 2019, 4:24 p.m.