R/cov2corr.R

##====================================================================
## Prefer corr and sd to covariance?
##====================================================================

"cov2corr" <- function(cov) {
  s <- sqrt(diag(cov))
  res <- cov / outer(X = s, Y = s, FUN = "*")
  res
}

Try the Renext package in your browser

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

Renext documentation built on Aug. 30, 2023, 1:06 a.m.