Re: [R] Sorting a matrix

From: Erik Iverson <iverson_at_biostat.wisc.edu>
Date: Thu, 10 Jul 2008 13:34:06 -0500

Do you really want to sort a *matrix*, or do you mean a data.frame? See ?order.

Angelo Scozzarella wrote:
> Hi,
>
> I want to sort a matrix by a specific variable without changing the row
> binding between variables.
>
> Ex.
>
> Name Sex Age
> Fred M 24
> John M 18
> Mary F 21
>
>
> ordered by Age
>
>
> Name Sex Age
> John M 18
> Mary F 21
> Fred M 24
>
>
>
> Thanks
>
>
>
> Angelo
>
> ______________________________________________
> 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.



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. Received on Thu 10 Jul 2008 - 18:38:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Jul 2008 - 19:32:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive