LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 13 Oct 2000 11:30:47 -0600
Reply-To:     Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject:      Re: Duplicate Observations!
Comments: To: carlytuur@MY-DEJA.COM
Comments: cc: ylau1@irix2.gl.umbc.edu
Content-Type: text/plain; charset=us-ascii

There are several circumstances under which NODUPLICATES fails without warning. Please see my paper, "The Problem With NODUPLICATES", at

<http://www2.sas.com/proceedings/sugi25/25/po/25p221.pdf>.

Incidentally, the code below won't run; PROC SORT requires a BY statement. Code that would work:

proc sort data=data1 nodup; by _all_; run;

-- JackHamilton@FirstHealth.com Development Manager, Technical Group METRICS Department, First Health West Sacramento, California USA

>>> <carlytuur@MY-DEJA.COM> 10/13/2000 5:34 AM >>> In my opinion the easiest solution is to use a sort;

proc sort data = data1 nodup; run;

This compares a complete record with the previous record. Removing it when all variables are the same.

Pascal

In article <8rl1ul$sio$1@news.umbc.edu>, <ylau1@irix2.gl.umbc.edu> wrote: > Hi. Does anyone know how to obtain recrods that have duplicates? For example, > > Obs Var1 Var2 Var3 Var4 Var5 Var6 Var7 > 1 2869 D368 4103 1988 1988 1999 2063 > 2 2869 D368 4103 1988 1988 1999 2063 > 3 5292 D369 0010 1988 1988 1992 2063 > 4 5292 D369 0003 1988 1988 1992 2063 > 5 9232 6944 1892 1988 1988 1991 2063 > 6 9232 6944 1892 1988 1988 1991 2063 > 7 4304 D008 3005 1991 1991 1999 2063 > 8 4304 D008 3005 1991 1991 1999 2063 > 9 4304 D008 7009 1991 1991 1999 2063 > 10 2096 4108 2800 1988 1992 1998 9063 > 11 4096 7016 2800 1988 1992 1998 2063 > > I would like to keep observations 1,2,5,6,7, and 8. > > Thanks for any help. > > Anna >

Sent via Deja.com http://www.deja.com/ Before you buy.


Back to: Top of message | Previous page | Main SAS-L page