【发布时间】:2013-11-19 13:03:51
【问题描述】:
我有这个函数,它需要几个参数。 我这里有这部分功能:
sort.order <- order(inputs[,input.of.interest])
如果我读取输入,我会得到如下信息:
Status Quo Vaccination
[1,] 10.409146 16.252537
[2,] 5.834875 9.373437
[3,] 5.784903 15.935623
[4,] 12.208484 18.654250
[5,] 9.786787 16.467321
[6,] 6.560276 9.689887
但是 input.of.interest 应该是什么? 什么意思,这个函数是怎么用的?
它应该是一个数字,即如果它是2,它会做什么?
【问题讨论】:
-
它选择要排序的列。如果为 1,则按
Status Quo排序,如果为 2,则按Vaccination排序。 -
太好了,请将其发布为答案,以便我接受 :)
标签: r