Learn R Programming

correlation (version 0.8.6)

matrix_inverse: Matrix Inversion

Description

Performs a Moore-Penrose generalized inverse (also called the Pseudoinverse).

Usage

matrix_inverse(m, tol = .Machine$double.eps^(2/3))

Value

An inversed matrix.

Arguments

m

Matrix for which the inverse is required.

tol

Relative tolerance to detect zero singular values.

See Also

pinv from the pracma package

Examples

Run this code
m <- cor(iris[1:4])
matrix_inverse(m)

Run the code above in your browser using DataLab