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 1999, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 3 Sep 1999 00:02:54 -0400
Reply-To:   S David Riba <dave@JADETEK.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   S David Riba <dave@JADETEK.COM>
Comments:   To: HyeRyung Lee <hrlee@WORLDNET.ATT.NET>
Content-Type:   text/plain; charset="euc-kr"

I think this is what you are seeking:

data one (rename=(var1=one_var1 var2=one_var2)) two (rename=(var1=two_var1 var2=two_var2)) ; set a.original; if visit=0 output one; if visit=1 output two; run;

HTH

Dave

---------------------------------------------------------------------------- S. David Riba INTERNET: dave@JADETEK.COM JADE Tech, Inc. http://www.jadetek.com P O Box 4517 Clearwater, FL 33758 SAS Certified Professional - V6 VOICE: (727) 726-6099 A SAS Institute Quality Partner

SAS. It's not just an attitude

----- Original Message ----- From: HyeRyung Lee <hrlee@WORLDNET.ATT.NET> Newsgroups: bit.listserv.sas-l To: <SAS-L@LISTSERV.UGA.EDU> Sent: Thursday, September 02, 1999 11:53 PM

> hello, could anyone solve this question for me? > I have a dataset which has visits from 0 to 5. make a new data sets which is > averaged from visit 0 and visit 2. Each has 20 variables with numeric > values. Is there any simple way to average the values of variable at one > step? > For example, > data one two; > set a.original; > if visit=0 output one; > if visit=1 output two; > run; > > data one; > set one; > rename var1=one_var1; > rename var2=one_var2; > . > . > . > proc sort;by id; > run; > > data two; > set two; > rename var1=two_var1; > rename var2=two_var2;


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