LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 12 Aug 2002 14:38:45 +0200
Reply-To:   Jones John <John.Jones@UCB-GROUP.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jones John <John.Jones@UCB-GROUP.COM>
Subject:   Re: Inventing a ranking variable
Comments:   To: Shane <sjun@HANYANG.AC.KR>
Content-Type:   text/plain; charset="iso-8859-1"

proc rank.

-----Original Message----- From: Shane [mailto:sjun@HANYANG.AC.KR] Sent: Monday, August 12, 2002 12:24 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Inventing a ranking variable

Hi Everyone,

I need to invent a variable that shows ranks of observations.

data rank; input X1 X2; datalines; 5 60 6 80 7 60 ;

How can I make a new variable, Rank, which shows the ranking of variable X1?

The new dataset would look like,

Rank X1 X2

1 5 60 2 6 80 3 7 60

Thanks in advance.

Shane.

--------------------------------------------------------- Legal Notice: This electronic mail and its attachments are intended solely for the person(s) to whom they are addressed and contain information which is confidential or otherwise protected from disclosure, except for the purpose they are intended to. Dissemination, distribution, or reproduction by anyone other than their intended recipients is prohibited and may be illegal. If you are not an intended recipient, please immediately inform the sender and send him/her back the present e-mail and its attachments and destroy any copies which may be in your possession. ---------------------------------------------------------


Back to: Top of message | Previous page | Main SAS-L page