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 (March 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 13 Mar 2007 12:53:49 -0400
Reply-To:     "data _null_;" <datanull@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "data _null_;" <datanull@GMAIL.COM>
Subject:      Re: A Simple Proc Transpose Question
Comments: To: Rathindronath <mehedisas@yahoo.com>
In-Reply-To:  <200703131639.l2DAkUeP023119@mailgw.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

You might try this...

data work.test; input Patient (hour4 hour8) (:$3.); label hour4='4 Hour' hour8='8 Hour'; cards; 1 Yes Yes 2 No Yes 3 Yes No ;;;; proc print; proc transpose label=Hour out=work.new(drop=_name_ rename=(col1=Response)) ; by patient; var hour:; attrib Hour label='Hour'; run; proc contents varnum; proc print; run;

On 3/13/07, Rathindronath <mehedisas@yahoo.com> wrote: > I have a following dataset: > > patient 4 hour 8 hour > ------- ------ ------ > 1 Yes Yes > 2 No Yes > 3 Yes No > > Now I need a following dataset: > > Patient hour Response > ------- ---- --------- > 1 4 hour Yes > 1 8 hour Yes > 2 4 hour No > 2 8 hour Yes > 3 4 hour Yes > 3 8 hour No > > Thanks a lot. And please do not get mad at me since I have asked too > simple question. I am learning everyday. >


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