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:10:30 -0700
Reply-To:     Sterling Paramore <gnilrets@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Sterling Paramore <gnilrets@GMAIL.COM>
Subject:      Re: Flagging Duplicates
In-Reply-To:  <201103171704.p2HFiiTI028001@waikiki.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1

Run it and find out!

On Thu, Mar 17, 2011 at 10:04 AM, Randy <randistan69@hotmail.com> wrote:

> 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