|
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.
---------------------------------------------------------
|