| Date: | Tue, 18 Apr 2000 20:26:09 +0200 |
| Reply-To: | "Hellriegel, Gerhard" <Gerhard.Hellriegel@TELEKOM.DE> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Hellriegel, Gerhard" <Gerhard.Hellriegel@TELEKOM.DE> |
| Subject: | AW: Dividing Dataset Into Two |
| Content-Type: | text/plain; charset="iso-8859-1" |
should work with soething like:
data a b;
set xxx;
if not mod(_n_,5) then output b;
else output a;
run;
----------------------------------------------
Gerhard Hellriegel
DeTeCSM / SLM
Im Leuschnerpark 4
64347 Griesheim
Tel.: +49 6151 818 9806
Fax: +49 6151 818 9611
Mobil: 0171 2263497
e-mail: gerhard.hellriegel@telekom.de
privat: ghellrieg@t-online.de
----------------------------------------------
> -----Urspr> üngliche Nachricht-----
> Von: O J Nwoha [SMTP:nwohaj@SPECTRE.AG.UIUC.EDU]
> Gesendet am: Dienstag, 18. April 2000 20:15
> An: SAS-L@LISTSERV.UGA.EDU
> Betreff: Dividing Dataset Into Two
>
> SAS Experts:
>
> I have a dataset of 13608 observations and I want to break it into two
> datasets as follows:
>
> Dataset A has 80 percent of the observations.
> Dataset B has 20 percent of the observations, but I need it to contain
> every fifth observation from the entire data set. Observations in A
> should not be in B.
>
> How can I do this?
>
> Thanks in advance for your help.
>
> Ogbonnaya John Nwoha
> http://www.ag.uiuc.edu/~nwohaj/
>
>
> Research Assistant, AgMas & FARM.DOC Projects
> http://web.aces.uiuc.edu/farm.doc/
|