Skip to content

Instantly share code, notes, and snippets.

@swuecho
Created January 13, 2012 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swuecho/1604771 to your computer and use it in GitHub Desktop.
Save swuecho/1604771 to your computer and use it in GitHub Desktop.
cov2cor
cov2cor <- function(x) {
for (i in 1:dim(x)[1]){
for (j in 1:dim(x)[2]){
x[i,j]<-x[i,j]/sqrt(x[i,i]/sqrt[j,j]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment