# MCT ordered by the second column of MCT, from smallest to largest values
MCT[order(MCT[, 2]), ]

Jean


Trying To learn again <tryingtolearnag...@gmail.com> 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 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 worked.
> 
> It is suposed that a will have the ordered on ascending or descending
> direction, doesn´it?

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to