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 (May 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 18 May 2010 15:23:03 -0400
Reply-To:     oloolo <dynamicpanel@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         oloolo <dynamicpanel@YAHOO.COM>
Subject:      Re: keep duplicates
Comments: To: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>

duplicate means more than two identical records, so triple, multiple all counts in

this method leaves your original data intacted so you still keep duplicates in one dataset, the original data set, and you get one bonus data which keeps only the unique ones

On Tue, 18 May 2010 13:42:05 -0400, Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE> wrote:

>that does not keep the duplicates in one dataset, but separates them in >two. I did understand it the other way: keep duplicates together. I'm not >sure about triples or more repeats... > >Gerhard > > > > >On Tue, 18 May 2010 13:23:07 -0400, oloolo <dynamicpanel@YAHOO.COM> wrote: > >>proc sort data=mydata out=unique dupout=dupdata nodupkey; >> by id; >>run; >> >>On Tue, 18 May 2010 10:01:55 -0700, Sterling Paramore <gnilrets@GMAIL.COM> >>wrote: >> >>>First-dot/last-dot processing to the rescue: >>> >>>proc sort data = mydata; >>> by id; >>>run; >>> >>>data dupes; >>> set mydata; >>> by id; >>> >>> if not (first.id and last.id) then >>> output; >>>run; >>> >>>On Tue, May 18, 2010 at 9:49 AM, Christina Morales >><ctromanph@gmail.com>wrote: >>> >>>> Hello, >>>> >>>> I was wondering if someone can tell me how to output duplicate data but >>in >>>> a >>>> way that you get both records. >>>> >>>> So basically if I have a data set with three variables: >>>> >>>> id age sex >>>> >>>> and there are two individuals with the same id I want to output a data >>set >>>> that has those two records. >>>> >>>> Any help will be appreciated, >>>> >>>> Chris >>>>


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