Re: [R] How do you sort a data frame on a selection of columns?

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Fri 08 Jul 2005 - 10:26:23 EST

Does "order" do what you want?

spencer graves

Briggs, Meredith M wrote:

> This is what to start with:
>
> Data Frame A B C D
> c1 4 y 5
> c3 6 d 7
> c1 5 t 6
>
> Now sort on A then C
>
> This is what to end with:
>
> Data Frame A B C D
> c1 5 t 6
> c1 4 y 5
> c3 6 d 7
>
> I assume it is something like this:
>
> attach(DF)
> sort(DF,partial=c(A,C))
>
>
>
> Thanks in advance.
>
> Meredith
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA

spencer.graves@pdf.com
www.pdf.com <http://www.pdf.com>
Tel:  408-938-4420
Fax: 408-280-7915

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Jul 08 10:36:37 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:22 EST