| 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 |
|
| 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
|