matrix_inverse: Matrix Inversion

View source: R/matrix_inverse.R

matrix_inverseR Documentation

Matrix Inversion

Description

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

Usage

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

Arguments

m

Matrix for which the inverse is required.

tol

Relative tolerance to detect zero singular values.

Value

An inversed matrix.

See Also

pinv from the pracma package

Examples

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

easystats/correlation documentation built on April 12, 2025, 10:53 p.m.