s-news
[Top] [All Lists]

SUMMARY: Sorting a dataframe by multiple variables

To: "S-News (E-mail)" <s-news@lists.biostat.wustl.edu>
Subject: SUMMARY: Sorting a dataframe by multiple variables
From: "Thompson, Trevor" <tkt2@cdc.gov>
Date: Wed, 22 May 2002 11:21:07 -0400
Thanks to Bert Gunter, Dorfman_A, Anne York, and Jingshan Zhang for their
quick responses to my question.  The simplest solution was to apply a
negative sign to the descending columns, use sort.col or order() to do an
ascending sort, and then undo the negatives.  

Thanks!!

-Trevor   

-----Original Message-----
From: Thompson, Trevor [mailto:tkt2@cdc.gov]
Sent: Wednesday, May 22, 2002 10:04 AM
To: S-News (E-mail)
Subject: [S] Sorting a dataframe by multiple variables


I am trying to sort a dataframe by multiple columns using both ascending and
descending order.  It appears to me that sort.col only allows one order type
to be used.  I found this question in the archives, but there were no follow
up posts.  Any suggestions on how I might accomplish this?

Thanks!

-Trevor

--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>
  • SUMMARY: Sorting a dataframe by multiple variables, Thompson, Trevor <=