a <- c(5,4,3,2,1)
b <- c(1,2,3,4,5)
c <- cbind(a,b)

c[order(c[,1]),] #按第一列递增排序

转载https://blog.csdn.net/illfm/article/details/15218349
order函数的简单使用
R语言矩阵排序
最新推荐文章于 2022-09-15 19:51:03 发布
R语言矩阵排序
a <- c(5,4,3,2,1)
b <- c(1,2,3,4,5)
c <- cbind(a,b)

c[order(c[,1]),] #按第一列递增排序

转载https://blog.csdn.net/illfm/article/details/15218349

被折叠的 条评论
为什么被折叠?