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
|