How to find the strongest correlation with big data in R? I am trying to find the strongest correlation between two data sets in R and one set has 9000+ columns. I used cor() and it worked well, but is there a function or way to find the strongest correlation value and column name? Note that I do have many NA values in the correlation matrix, but this is to be expected for my situation. Any advice would be really appreciated.

I have some experience with this question, but it may not be the best.
Suppose the correlation coefficient is stored in corr_df(a data frame [9000,1])
Try this code:
corr_df[order(corr_df[,1],decreasing = TRUE),]

It can rank the magnitude of the correlation coefficients from high to low, and also get the row(or col) for corresponding coefficient specifi.
I hope it will be helpful to you.
