reduceMat {apComplex} | R Documentation |
This function eliminates columns that are identically equal to or strictly less than other columns in a matrix.
reduceMat(mat, compare = "equal")
mat |
mat is a matrix. |
compare |
compare is a character equal to "equal" (default) or "less". |
If compare
is set to "equal", sets of identically equal columns are found. The first of these columns is kept in the matrix and the rest are eliminated.
If compare
is set to "less", then a column is removed from the matrix if all of its entries are less than all entries of another column in the matrix.
A matrix with columns eliminated according to the criteria specified in compare
.
Denise Scholtens
a <- matrix(c(1,0,1,1,1,0,1,0,1,1,0,0),nrow=3) reduceMat(a) reduceMat(a,compare="less")