Date: Thu, 11 Sep 1997 17:01:11 -0400
Reply-To: Garth Rauscher <grausche@SPH.UNC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Garth Rauscher <grausche@SPH.UNC.EDU>
Subject: Re: deleting duplicates
In-Reply-To: <5v96ou$ruo$1@News.Dal.Ca>
Content-Type: TEXT/PLAIN; charset=US-ASCII
to remove duplicate ids, try this:
proc sort nodupkey;
by id;
run;
On Thu, 11 Sep 1997, Lynn Nicole Lethbridge wrote:
> Hi there
>
> I have data where there are duplicates of observations. I'd like to get
> rid of the duplicates which appear together. Included with the data are
> unique identifiers for each observation. So for example in the following:
>
> obs id
> 1 1
> 2 2
> 3 3
> 4 3
> 5 3
>
> I'd like to get rid of obs 4 and 5.
>
>
> The repeats always follow directly after the original observation which I
> keep.
>
>
> Thanks so much for any help.
>
> Lynn
>
|