Suppose I have a data frame consisting of 20 columns (variables) and all of them are numeric. I can always use the cor function in R to get the correlation coefficients in matrix form or actually visualize the correlation matrix (with correlation coefficients labeled as well). Suppose I just want to sort the pairs according to the correlation coefficients value, how to do this in R ?