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 (December 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 23 Dec 2004 17:36:24 -0500
Reply-To:     Bogdan Mihai <strimbu@INTERCHANGE.UBC.CA>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Bogdan Mihai <strimbu@INTERCHANGE.UBC.CA>
Subject:      random rank assignation

Hi everybody,

I have a data which look like that: data one; input a b; cards; 1 24 1 3 1 67 1 85 1 9 2 5 2 61 2 9 2 56 2 23 ; I want to create a new variable rank, which randomly assigns a rank to each b inside a;

something like:

a b rank 1 24 2 1 3 3 1 67 1 1 85 5 1 9 4 2 5 5 2 61 3 2 9 2 2 56 1 2 23 4

Any suggestions? Merry Christmas to all,

Bogdan


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