RemoveZeroVariance: RemoveZeroVariance

View source: R/functions.R

RemoveZeroVarianceR Documentation

RemoveZeroVariance

Description

RemoveZeroVariance removes rows/columns from a matrix that have zero variance

Usage

RemoveZeroVariance(x, rows = TRUE, cols = FALSE)

Arguments

x

- matrix

rows

- logical, default TRUE

cols

- logical, default FALSE

Value

a list containing the following elements

matrix - the supplied matrix with the rows/columns removed

rowsKept - a character vector with the names of the rows that were not removed NULL if rows = FALSE

rowsRemoved - a character vector with the names of the rows that were removed NULL if rows = FALSE

colsKept - a character vector with the names of the columns that were not removed NULL if cols = FALSE

colsRemoved - a character vector with the names of the columns that were removed NULL if cols = FALSE

Examples

countMatrix <- matrix( sample(1:100, 100), ncol = 10)
countMatrix[ 3, ] <- rep(0,10)
countMatrix[ 6, ] <- rep(0,10)
RemoveZeroVariance( countMatrix, rows = TRUE, cols = TRUE )


richysix/geneExpr documentation built on Oct. 7, 2022, 2:18 a.m.