vecInMat {apComplex}R Documentation

Vector in Matrix

Description

This functions checks if a vector is identical to or strictly less than at least one column in a matrix.

Usage

vecInMat(x, mat, compare = "equal")

Arguments

x A vector.
mat A matrix with number of rows equal to the length of x.
compare A character equal to "equal" (default) or "less".

Details

If compare is set to "equal", the function checks to see if x is identically equal to at least one column in mat.

If compare is set to "less", the function checks to see if all elements of x are less than all elements of at least one column in mat.

Value

A logical value, indicating if x is equal to (or strictly less than) at least one column in mat.

Author(s)

Denise Scholtens

See Also

reduceMat,reduceMatNew,whichVecInMat

Examples

a <- matrix(c(1,0,1,1,1,0),nrow=3)
x1 <- c(1,0,1)
x2 <- c(1,1,1)
x3 <- c(1,0,0)

vecInMat(x1,a)
vecInMat(x2,a)
vecInMat(x3,a,compare="less")


[Package apComplex version 1.0.1 Index]