subsampleCells: Subsample cells

View source: R/markerGenesAndMapping.r

subsampleCellsR Documentation

Subsample cells

Description

Subsets a categorical vector to include up to a maximum number of values for each category.

Usage

subsampleCells(clusters, subSamp = 25, seed = 5)

Arguments

clusters

vector of cluster labels (or any category) in factor or character format

subSamp

maximum number of values for each category to subsample. Can be single integer for global subsampling, or a *named* vector corresponding to how many values to take from each category in clusters.

seed

for reproducibility

Value

returns a vector of TRUE / FALSE with a maximum of subSamp TRUE calls per category


AllenInstitute/mfishtools documentation built on July 5, 2023, 4:20 p.m.