【发布时间】:2014-02-19 05:55:32
【问题描述】:
我使用以下代码找到了我的数据的相关矩阵:
file_20 <- read.csv("C:/Desktop/ex.csv")
file_20
cor (file_20[,1:19], file_20[1:19], method ="spearman")
但是现在我该如何排列我的相关矩阵?有什么建议
注意:我有 19 列和 20 行(包括标题),我的目标是根据 spearman 排名相关性对列进行排名。
我试过了
cor (rank(file_20[,1:19]), rank(file_20[1:19]), method ="spearman")
它显示输出为
[1] 1
是否有任何选项可以让我在表格中的所有列排名?
请帮忙!
【问题讨论】:
标签: r correlation ranking