Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个大的无序矩阵,我想获得第二高值的索引。
x <- matrix(c(4:7, 2, 1), nrow = 2, ncol = 3) which.max(x)
这给了我四个作为最大值 7 的索引。但是有谁知道如何获得第二、第三或第四高的索引?