RemoveZeroVariance | R Documentation |
RemoveZeroVariance
removes rows/columns from a matrix that have zero variance
RemoveZeroVariance(x, rows = TRUE, cols = FALSE)
x |
- matrix |
rows |
- logical, default TRUE |
cols |
- logical, default FALSE |
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
countMatrix <- matrix( sample(1:100, 100), ncol = 10) countMatrix[ 3, ] <- rep(0,10) countMatrix[ 6, ] <- rep(0,10) RemoveZeroVariance( countMatrix, rows = TRUE, cols = TRUE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.