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 (March 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 17 Mar 2011 10:12:43 -0700
Reply-To:   "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject:   Re: Flagging Duplicates
Comments:   To: Randy <randistan69@HOTMAIL.COM>
In-Reply-To:   A<201103171704.p2HFiiTI028001@waikiki.cc.uga.edu>
Content-Type:   text/plain; charset="us-ascii"

Hi Randy,

Yes that is correct.

Your 1 flags the first occurance of each group. Your 0 flags the duplicates (within each group).

Hope this is helpful.

Mark Terjeson Investment Business Intelligence Investment Management & Research Russell Investments 206-505-2367

Russell Global Leaders in Multi-Manager Investing

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Randy Sent: Thursday, March 17, 2011 10:04 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Flagging Duplicates

I have a large data set and I need to flag duplicates

The data set is as follows:

IDA 1 1 1 2 3 3 4

I want the data set as follows:

IDA flag_dup 1 1 1 0 1 0 2 1 3 1 3 0 4 1

My code is as follows. Is it correct?

data want ; set have ; by IDA ; if first.IDA then flag_Dup = 1 ; else flag_dup = 0 ; run;


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