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 (November 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 11 Nov 2006 08:30:36 -0500
Reply-To:   "data _null_;" <datanull@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "data _null_;" <datanull@GMAIL.COM>
Subject:   Re: Dataset modifictaion
Comments:   To: SM <jishnu.guhathakurta@gmail.com>
In-Reply-To:   <1163207887.816375.23810@m73g2000cwd.googlegroups.com>
Content-Type:   text/plain; charset=ISO-8859-1; format=flowed

Once again. I added the OBS option to the IDROUP specification. Now you have unique ID(name) of min and MAX and the observation number of the min and max. What else do you want?

proc transpose data=sashelp.class out=work.class; by name sex; var _numeric_; run; proc summary data=work.class nway; class _name_ sex; output out=work.stat(drop=_type_ rename=(_obs_=highObs _obs2_=lowObs)) range(col1) = range idgroup(max(col1) obs out(col1 name)=highval highName) idgroup(min(col1) obs out(col1 name)=lowval lowName) ; run; proc transpose name=name data=work.stat; by _name_ sex; var highval lowval highObs lowObs highName lowName Range; run; proc contents varnum; proc print; run;

On 11/10/06, SM <jishnu.guhathakurta@gmail.com> wrote: > Thank you for the advice, > Proc Means has helped me to exceute the min max and range. > But I cannot get the uniqueid of the min, max ? > Any help >


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