subsample: Randomly subsample single cell data set

View source: R/scRNA.R View source: R/basics.R

subsampleR Documentation

Randomly subsample single cell data set

Description

Randomly subsample a proportion of data, cells must be in the same order in counts and metadata.

Randomly subsample a proportion of data, cells must be in the same order in counts and metadata.

Usage

subsample(counts, metadata, p = 0.5, replace = T)

subsample(counts, metadata, p = 0.5, replace = T)

Arguments

counts

a m x n matrix of raw count data where m = no. genes, and n = no. cells

metadata

matrix n x j of metadata where n = no. cells, and j = no. features

p

proportion of data to subsample (p = 0, 1)

replace

boolean to sample with (T) or without (F) replacement

Value

a list with objects named "c" and "m" corresponding to your subsampled counts and metadata

a list with objects named "c" and "m" corresponding to your subsampled counts and metadata


Jerby-Lab/opipes documentation built on Oct. 7, 2022, 12:28 p.m.