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 (September 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 22 Sep 2003 10:38:19 -0700
Reply-To:     cassell.david@EPAMAIL.EPA.GOV
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "David L. Cassell" <cassell.david@EPAMAIL.EPA.GOV>
Subject:      Re: Min among variables
Content-type: text/plain; charset=US-ASCII

Pascale.Beaupre@STATCAN.CA wrote [in aprt]: > data set. I would like to have them ordered chronologically. That is, > information (variables) concerning the respondents' first child (oldest), > second child, and so on... I thought I could create a variable "rank" or > something similar allowing me to order the children by their arrival.

Since you want all the variables sorted (or ranked), instead of your somewhat misleading subject line of just a 'min among variables', I suggest you look in the SAS-L archives for posts by Paul Dorfman. He wrote a complete (and fast) sorting routine for a situation like this, and his code is designed to be easily incorporated into code. He also has shown that his code is significantly faster than using ORDINAL() K times to arrange K variables.

HTH, David -- David Cassell, CSC Cassell.David@epa.gov Senior computing specialist mathematical statistician


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