downsampleByVar: Downsample an input data-frame or matrix based on variance.

Description Usage Arguments Details Value Author(s) Examples

View source: R/downsampleByVar.R

Description

Downsample an input data-frame or matrix based on variance.

Usage

1
downsampleByVar(x, varianceFactor = 0.1, verbose = TRUE)

Arguments

x

Input data-matrix.

varianceFactor

Removes this proportion of variables based on lesser variance.

verbose

Boolean (TRUE / FALSE) to print messages to console or not.

Details

Downsample an input data-frame or matrix based on variance.

Value

A matrix object.

Author(s)

Kevin Blighe <kevin@clinicalbioinformatics.co.uk>

Examples

1
2
3
4
5
6
# create random data that follows a negative binomial
mat <- jitter(matrix(
  MASS::rnegbin(rexp(1000, rate=.1), theta = 4.5),
  ncol = 20))

downsampleByVar(mat, varianceFactor = 0.1)

kevinblighe/scDataviz documentation built on Sept. 28, 2021, 12:04 p.m.