# MCT ordered by the second column of MCT, from smallest to largest values
MCT[order(MCT[, 2]), ]
Jean
Trying To learn again wrote on 07/17/2012
04:42:24 PM:
> Hi all,
>
> I want to order a series that is included on the second column in
MCT.csv.
>
> I do but R doesn´t order, could be beca
1. That you think order() or sort() "did not work " is preposterous.
2. I suggest that you carefully read both ?sort and ?order, as you
obviously do not understand what these functions do. Here is a hint to get
you started:
> 3:1
[1] 3 2 1
> order(3:1)
[1] 3 2 1
> sort(3:1)
[1] 1 2 3
-- Bert
O
Hi all,
I want to order a series that is included on the second column in MCT.csv.
I do but R doesn´t order, could be because is a csv?
I have prove
MCT<-read.csv("MCT.csv")
a<-order(MCTor[,2],2,decreasing = FALSE)
a<-order(MCTor[,2],1,decreasing = FALSE)
or the same with sort but didn´t wo
3 matches
Mail list logo