LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 2000, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 21 Mar 2000 13:31:12 -0800
Reply-To:     Ya Huang <ya.huang@AGOURON.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ya Huang <ya.huang@AGOURON.COM>
Subject:      Re: create report in row
Comments: To: Daniella Priscila Cruz - Estagiaria SAS
          <dpcruz@CENAPAD.UNICAMP.BR>
Content-Type: text/plain; charset=us-ascii

Here is one solutions:

** testing data; data xx; do i=1 to 10; a=uniform(i)>0.5; b=uniform(i*999)>0.5; output; end;

data xx; set xx (keep=a rename=(a=v) in=a) xx (keep=b rename=(b=v) in=b); if a then ab='a'; if b then ab='b'; dummy=1;

options nocenter;

proc tabulate; class ab v; var dummy; table ab='', v*dummy=''*sum=''*f=6.; run;

=======

:-------------------------------.-------------: | | V | | !------.------| | | 0 | 1 | !-------------------------------+------+------| |a | 4| 6| !-------------------------------+------+------| |b | 5| 5| ;-------------------------------^------^------!

HTH

Ya Huang

Daniella Priscila Cruz - Estagiaria SAS wrote:

> Dear list, > > I would like to know how I can to do a report in row. > Example: > In my data I have 2 variables A and B, this variable has 0 and 1. > A B > ___________ > 1 0 > 0 1 > 1 0 > ______________________________________ > Result that I want : > 0 1 > A 1 2 > B 2 1 > ______________________________________ > > I used proc tabulate, but the result is > > A B > 0 1 0 1 > 1 2 2 1 > ______________________________________ > > Thanks, Daniella Cruz


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