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 (November 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 9 Nov 2007 07:54:36 -0800
Reply-To:   pheidema@FAU.EDU
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   pheidema@FAU.EDU
Organization:   http://groups.google.com
Subject:   count obs by variable
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset="iso-8859-1"

Hi all. I have a large dataset that is sorted by year, then by timestep, then by score (descending). Each timestep has 16000 obs, but I only want the highest 4000 scores for analysis. Is there a way to either: 1) count the obs by year by timestep, adding a new var called count, and then I can later drop all obs whose count is greater than 4000; or 2) write a loop that counts and moves to a new dataset the top 4000 obs of each timestep of each year?

Thanks a lot. Phil


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