Learn R Programming

PERMANOVA (version 0.2.0)

Ginv: G inverse

Description

Calculates the g-inverse of a squared matrix using the eigen decomposition and removing the eigenvalues smaller than a tolerance.

Usage

Ginv(X, tol = sqrt(.Machine$double.eps))

Arguments

X

Matrix to calculate the g-inverse.

tol

Tolerance.

Value

Returns the g-inverse.

Details

The function is useful to avoid singularities.

Examples

Run this code
# NOT RUN {
data(iris)
x=as.matrix(iris[,1:4])
S= t(x) 
# }
# NOT RUN {
<!-- %*% x -->
# }
# NOT RUN {
Ginv(S)
# }

Run the code above in your browser using DataLab