[R] sort columns

Henrique Dallazuanna wwwhsd at gmail.com
Fri Feb 26 19:51:45 CET 2010


Try this:

apply(m, 2, sort)

On Fri, Feb 26, 2010 at 2:41 PM, frederik vanhaelst
<frederik.vanhaelst at gmail.com> wrote:
> Hello,
>
> i have a 50*100 matrix, with real numbers. How do i sort each column?
> Now i sort it with a for-loop but this take a lot of time...
>
> Thank you,
>
> Frederik
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list