R/r2cov.R

r2cov <- function(sd, R){
    Dsqrt <- matrix(0, ncol=length(sd), nrow=length(sd))
    diag(Dsqrt) <- sd
    output <- Dsqrt %*% R %*% Dsqrt
    return(output)
}

Try the rpsychi package in your browser

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

rpsychi documentation built on May 1, 2019, 10:10 p.m.