rank_matrix: Rank of matrix

Description Usage Arguments Details Examples

Description

returns the rank of a square matrix

Usage

1
  rank_matrix(x, method = "qr")

Arguments

x

numeric matrix

method

type of decomposition: "qr" or "chol"

Details

The rank is calculated based on the selected method

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(5)
M1 = matrix(runif(21), 3, 7)

# rank
rank_matrix(M1)

# another matrix
M2 = matrix(1:20, 4, 5)

# rank
rank_matrix(M2)

gastonstat/matrixkit documentation built on May 16, 2019, 5:45 p.m.