getzerorowcolnames_byname {matsbyname}R Documentation

Names of zero rows and columns

Description

When a matrix has rows or columns full of zeroes, it is singular, and can't be inverted. This function returns the names of rows or columns that are full with zeroes.

Usage

getzerorowcolnames_byname(a, tol = 1e-06)

Arguments

a

A matrix or list of matrices.

tol

The allowable deviation from 0 for any element.

Value

A vector of names of zero rows or columns.

Examples

m <- matrix(c(1, 0, 1,
              1, 0, 0, 
              0, 0, 0),
            dimnames = list(c("r1", "r2", "r3"), c("c1", "c2", "c3")), 
            nrow = 3, ncol = 3, byrow = TRUE)
m
getzerorowcolnames_byname(m)

[Package matsbyname version 0.6.10 Index]