Learn R Programming

Morpho (version 2.12)

armaGinv: calculate Pseudo-inverse of a Matrix using RcppArmadillo

Description

a simple wrapper to call Armadillo's pinv function

Usage

armaGinv(x, tol = NULL)

Value

Pseudo-inverse

Arguments

x

numeric matrix

tol

numeric: maximum singular value to be considered

Examples

Run this code
mat <- matrix(rnorm(12),3,4)
pinvmat <- armaGinv(mat)

Run the code above in your browser using DataLab