search for: corrs_ordered

Displaying 1 result from an estimated 1 matches for "corrs_ordered".

2005 Jun 10
0
Top N correlations from 'cor' for very large datasets being run many times
...quot;test.txt", header=F, quote="", sep="\t", comment.char="", as.is=1) file1_cor = cor(t(file1), method = "pearson", use = "pairwise.complete.obs") diag(file1_cor) = NA #Set correlation to self as NA for (i in 1:15000){ corrs=file1_cor[,i] corrs_ordered=order(corrs,decreasing=TRUE) #Order correlations from largest to smallest top_corrs=corrs[corrs_ordered[1:n]] #Get top n correlations - these would be added to some data structure and used for subsequent analysis } #The not so nice way to get all possible correlations for each row and then stor...