| ginv2 | R Documentation |
Compute the Moore-Penrose generalized inverse of a matrix. This is an S3 generic function with methods for base matrices, dense Matrix objects, and sparse Matrix objects.
ginv2(X, tol = sqrt(.Machine$double.eps), ...)
ginv2_beachmat(X, tol = sqrt(.Machine$double.eps), ...)
ginv2_default(X, tol = sqrt(.Machine$double.eps), ...)
X |
A numeric or complex matrix |
tol |
Tolerance for determining rank. Default is sqrt(.Machine$double.eps) |
... |
Additional arguments passed to methods |
The generalized inverse of X
## Not run:
# Base R matrix
m <- matrix(c(1, 2, 3, 4, 5, 6), 2, 3)
ginv2(m)
# Dense Matrix
library(Matrix)
dm <- Matrix(m, sparse = FALSE)
ginv2(dm)
# Sparse Matrix
sm <- Matrix(m, sparse = TRUE)
ginv2(sm)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.