stratified_sample: Generate a stratified subsample for a vector given a grouping

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Use this function to compute LISI scores of one or more labels.

Usage

1
2
3
4
5
6
7
stratified_sample(
  indexer,
  grouping,
  sample_proportion = 0.1,
  min_count = 0,
  seed = 424242
)

Arguments

indexer

A vector containing cell barcodes/labels to subsample

grouping

A vector containg a groups to stratify by ( same size as indexer)

sample_proportion

proportion to sample data (default: .1)

min_count

Minimum number of samples in a group to keep

seed

seed value for set.seed

Value

A subsampled vector generated from indexer

Examples

1
2
3
4

scPOP documentation built on Aug. 4, 2021, 5:06 p.m.