Displaying 1 result from an estimated 1 matches for "top_corrs".
2005 Jun 10
0
Top N correlations from 'cor' for very large datasets being run many times
...quot;, 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 store only those that I want to keep. - too slow
file1 = read.table("test.txt", h...