Date: Sat, 17 Apr 1999 11:48:41 -0700
Reply-To: Martin Hillyer <hillyer@CMC.NET>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Martin Hillyer <hillyer@CMC.NET>
Subject: Re: delete observations
In-Reply-To: <3.0.1.32.19990418124015.006f898c@odin.wiwi.hu-berlin.de>; from
Kerstin Kamlage on Sun, Apr 18, 1999 at 12:40:15PM +0100
Content-Type: text/plain; charset=us-ascii
Not working (just going through e-mail), but without my manuals, here's something easy to try
if you don't mind your data to end up sorted (your example was sorted, but perhaps this won't
always be the case):
data whatever;
input nr ...;
...
;;
proc sort data=whatever nodupkey; by nr;
run;
If you don't want thing to end up sorted, just create an obs index and sort by it afterwards.
HTH, Martin Hillyer
Thus spake Kerstin Kamlage <kamlage@WIWI.HU-BERLIN.DE>
(on Sun, Apr 18, 1999 at 12:40:15PM +0100):
> Hello
>
> Is there anybody working on a sunday?
>
> I have a problem which can't be that difficult, but I go crazy.
>
> I have the variable nr with the following observations:
>
> nr
> 6
> 6
> 9
> 9
> 9
> 9
> 12
> 15
> 15
> 15
>
>
> What I need is only the first observation of each number, i.e.
> nr
> 6
> 9
> 12
> 15
>
> How can I do that?
> Thank you for your help,
>
> Kerstin Kamlage
|