所以就这么简单,谢谢。嵌入函数后排序矩阵R
我想不出一个可以帮助我排序嵌入函数的结果矩阵的一般函数。
例如:
moustache <- embed(c(1:4),3)
moustache
[,1] [,2] [,3]
[1,] 3 2 1
[2,] 4 3 2
I would rather like the matrix :
[,1] [,2] [,3]
[1,] 1 2 3
[2,] 2 3 4
感谢您的帮助。
目前还不清楚,你的排序规则其实就是。也许你想'髭[,命令(小胡子[1,])]''。 – Roland 2013-03-19 13:02:08
嵌入式给了我一个相反的时间序列,我只想把它放回原来的顺序 – user1627466 2013-03-19 13:20:49