If I understand what you want, you can use 'which' which(w>0.6, arr.ind=T)
On 08/11/2007, Christoph Scherber <[EMAIL PROTECTED]> wrote: > > Dear R users, > > suppose I have a matrix of observations for which I calculate all > pair-wise correlations: > > m=matrix(sample(1:100,replace=T),10,10) > w=cor(m,use="pairwise.complete.obs") > > How do I extract only those correlations that are >0.6? > > w[w>0.6] #obviously doesn´t work, > > and I can´t find a way around it. > > I would very much appreciate any help! > > Best wishes > Christoph > > > (using R 2.5.1 on Windows XP) > > > > > -- > Dr. Christoph Scherber > DNPW, Agroecology > University of Goettingen > Waldweg 26 > D-37073 Goettingen > Germany > > phone +49(0)551 39 8807 > fax +49(0)551 39 8806 > homepage www.gwdg.de/~cscherb1 > > ______________________________________________ > 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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ 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.