reduceMat {apComplex}R Documentation

Remove matrix columns

Description

This function eliminates columns that are identically equal to or strictly less than other columns in a matrix.

Usage

reduceMat(mat, compare = "equal")

Arguments

mat mat is a matrix.
compare compare is a character equal to "equal" (default) or "less".

Details

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.

Value

A matrix with columns eliminated according to the criteria specified in compare.

Author(s)

Denise Scholtens

See Also

vecInMat,whichVecInMat

Examples

a <- matrix(c(1,0,1,1,1,0,1,0,1,1,0,0),nrow=3)
reduceMat(a)
reduceMat(a,compare="less")


[Package apComplex version 1.4.0 Index]