onyourmark wrote:
Hi. I have a 925 by 925 correlation matrix corM. I want to identify all
variables that have correlation greater than 0.9.  Can anyone suggest an "R
way" of doing this?

Thank you.

Example:

# prepare example data:
x <- matrix((1:25) / 25, 5, 5)
rownames(x) <- letters[1:5]
colnames(x) <- letters[1:5]

# solution
cbind(rownames(x)[row(x)[x > 0.9]], colnames(x)[col(x)[x > 0.9]])


Uwe Ligges

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to