[18687] in s-news-athena
Re: [S] identical obervations
daemon@ATHENA.MIT.EDU (srs@io.harvard.edu)
Wed Jul 21 12:15:56 1999
From: srs@io.harvard.edu
Message-Id: <3.0.3.32.19990721121151.00881100@pop.fas.harvard.edu>
Date: Wed, 21 Jul 1999 12:11:51 -0400
To: John Thaden <jjthaden@flash.net>,
"Man S. Kwok" <mankwok@phoenix.princeton.edu>
Cc: s-news@wubios.wustl.edu
In-Reply-To: <3.0.3.32.19990721102927.006dfa88@pop.flash.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
That won't work. Consider: data.frame( x1=c(1:4,1), x2=c(1:4,2),
x3=c(1:4,3)). The last row is unique, but will be wrongly excluded.
At 10:29 AM 7/21/99 -0500, John Thaden wrote:
>
>: I have a data set of 6 varaibles and 2000 observations. I need to remove
>: repeated observations. Is there a quick way to locate exactly indentical
>: observations in S, without resorting to looping? Thanks in advance.
>
>> D <- D[!(duplicated(D$x1) & duplicated(D$x2) & duplicated(D$x3)
>+ & duplicated(D$x4) & duplicated(D$x5) & duplicated(D$x6)), ]
>
>John Thaden
>Little Rock, Arkansas, USA
>-----------------------------------------------------------------------
>This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
>send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
>message: unsubscribe s-news
>
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news