rnk {PEIP}R Documentation

Rank of Matrix

Description

Return the rank of a matrix. Not to be confused with the R function rank.

Usage

rnk(G, tol = 1e-14)

Arguments

G

Matrix

tol

machine tolerance for small numbers

Details

Number of singular values greater than tol.

Value

integer, number of non-zero singular values

Note

duplicate the matlab function rank

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

See Also

svd

Examples



hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, "+") }
X <- hilbert(9)[,1:6]
rnk(X)



[Package PEIP version 2.2-5 Index]