Try this: apply(m, 2, sort)
On Fri, Feb 26, 2010 at 2:41 PM, frederik vanhaelst <frederik.vanhae...@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@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 ______________________________________________ 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.