Hello, I would like to find out if a function already exists that returns only pairwise correlations above/below a certain threshold (e.g, -.90, .90) Thank you. -- View this message in context: http://r.789695.n4.nabble.com/return-only-pairwise-correlations-greater-than-given-value-tp4079028p4079028.html Sent from the R help mailing list archive at Nabble.com.
R. Michael Weylandt
2011-Nov-17 05:50 UTC
[R] return only pairwise correlations greater than given value
What exactly do you mean "returns" them? More generally I suppose, what do you have in mind to do with this? You could do something like this: BigCorrelation <- function(X){ return(which(abs(cor(X)) > 0.9, arr.ind = T)) } but it hardly seems worth its own function call. On Thu, Nov 17, 2011 at 12:42 AM, B77S <bps0002 at auburn.edu> wrote:> Hello, > > ?I would like to find out if a function already exists that returns only > pairwise correlations above/below a certain threshold (e.g, -.90, .90) > > Thank you. > > > > -- > View this message in context: http://r.789695.n4.nabble.com/return-only-pairwise-correlations-greater-than-given-value-tp4079028p4079028.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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. >