I have found a correlation matrix for my data using the following code:
file_20 <- read.csv("C:/Desktop/ex.csv")
file_20
cor (file_20[,1:19], file_20[1:19], method ="spearman")
But now how can i rank my correlation matrix? Is there any suggestion
NOTE: I have 19 columns and 20 rows (including the header) and my aim is to rank the columns according to spearman rank correlation.
I tried doing
cor (rank(file_20[,1:19]), rank(file_20[1:19]), method ="spearman")
It showed output as
[1] 1
Is there any option to get all my columns of the table ranked?
Please help!