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 (February 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 8 Feb 2002 17:49:27 +0000
Reply-To:     John Scott <jscottusa@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         John Scott <jscottusa@HOTMAIL.COM>
Subject:      Counting records in certain groups
Content-Type: text/plain; format=flowed

Hello,

Can someone help me creating a count variable for the following data:

data abc; input id month sale $; cards; 1 1 Y 1 2 Y 1 3 Y 1 4 N 1 5 Y 1 6 Y 1 7 N ;

What I need is a count variable as follows:

id month sale count 1 1 Y 1 2 Y 1 3 Y 3 1 4 N 1 1 5 Y 1 6 Y 2 1 7 N 1

Thanks for your help.

John

_________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx


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