| Date: | Thu, 25 May 2006 22:16:34 -0700 |
| Reply-To: | David L Cassell <davidlcassell@MSN.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | David L Cassell <davidlcassell@MSN.COM> |
| Subject: | Re: get the subset |
| In-Reply-To: | <200605250840.k4ONu3Ag016687@mailgw.cc.uga.edu> |
| Content-Type: | text/plain; format=flowed |
|---|
ljmpll@SOHU.COM wrote:
>How can I get the subset that inlcude every 41 records (from the No.1
>to No.41; No.42 to No.82 No. 83 to No.123) of a big sas set?Thank you!
Why would you want to do this, anyway? SAS works best when you
keep the large data sets intact.
Instead, mark the 41-record blocks with an identifier so each block
has a different value, and you can use by-processing. Or WHERE
clauses. Or whatever you need. Try this:
data new/view=new;
set YourOldData;
block = ceil(_n_/41);
run;
HTH,
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
|