R/mpinv.R

Defines functions mpinv

Documented in mpinv

mpinv <-
function(A, eps = 1e-13) {
    #Check also MASS package functions for the inverse of a matrix
    s <- svd(A)
    e <- s$d
    e[e > eps] <- 1/e[e > eps]
    return(s$v %*% diag(e) %*% t(s$u))
}

Try the phylin package in your browser

Any scripts or data that you put into this service are public.

phylin documentation built on Dec. 12, 2019, 5:07 p.m.