downsampleByVar {scDataviz} | R Documentation

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

### Description

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

### Usage

    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

    # 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)

[Package scDataviz version 1.4.0 Index]