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 (January 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 12 Jan 2010 13:58:41 +0100
Reply-To:   Daniel Fernández <fdezdan@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Daniel Fernández <fdezdan@GMAIL.COM>
Subject:   Re: how to find a count in datastep
Comments:   To: Shaik Hymad <hymadsk@gmail.com>
In-Reply-To:   <201001121235.o0CBlBL6026577@malibu.cc.uga.edu>
Content-Type:   text/plain; charset=ISO-8859-1

hi, try this:

data have; input patid per c trt; cards; 001 22.2 1 1 002 22.2 1 2 003 22.2 1 1 004 22.2 1 1 005 22.2 1 2 ; run; proc sql; create table want as select *, count(trt) as count from have group by trt order by patid; quit;

Dani Fernandez Barcelona

2010/1/12 Shaik Hymad <hymadsk@gmail.com>: > Hi to all, > > I have data like > > patid per c trt > 001 22.2 1 1 > 002 22.2 1 2 > 003 22.2 1 1 > 004 22.2 1 1 > 005 22.2 1 2 > > > i want count of patients treatment wise using datastep > > patid per c trt count > 001 22.2 1 1 3 > 002 22.2 1 2 2 > 003 22.2 1 1 3 > 004 22.2 1 1 3 > 005 22.2 1 2 2 >


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