> I basically want to remove all entries for pairs which have value in > between them (correlation calculated not in R, bit it is correlation, > r2) > so for example I would not keep: rs883504 because it has r2>0.8 for > all those rs...
I'm still not sure what "remove all entries" means? In your example rs883504, has all correlation coefficients > 0.8, in the data returned by head(). However, most of its correlation coefficients are < 0.8, if you include the entire matrix. If you remove a variable that has at least one correlation coefficient > 0.8, you would remove all the variables. However, if you remove a variable that has all correlation coefficients > 0.8, you would (probably) remove no variables. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.