s-news
[Top] [All Lists]

Re: intersection of 2 dataframes

To: <s-news@lists.biostat.wustl.edu>
Subject: Re: intersection of 2 dataframes
From: "Redfearn, Christian" <redfearn@sppd.usc.edu>
Date: Tue, 20 Jun 2006 08:45:13 -0700
In-reply-to: <E1FsiF5-000IcH-4V@pr-webmail-2.demon.net>
Thread-index: AcaUfyzwEZYUmJNLQ6KxlKiJrMMoIwAAUXiA
Thread-topic: [S] intersection of 2 dataframes
  Jonathan,

Check the following two related functions, one generally is more
appropriate given your context.

unique.data.frame(x)
duplicated.data.frame(x)

Chris.


-----Original Message-----
From: s-news-owner@lists.biostat.wustl.edu
[mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of
jdakin@OVERWEY.demon.co.uk
Sent: Tuesday, June 20, 2006 8:34 AM
To: s-news@lists.biostat.wustl.edu
Subject: [S] intersection of 2 dataframes

I have two different dataframes, each with exactly the same columns. I
wish to identify rows of data which are common to both.  

Intersect only applies to vectors.  I could apply intersect to
sequentially to different columns that each was identical but it seems a
long way about.  Is there a neater solution ?

I'm using Splus 6.1.  Many thanks for any advice.
Jonathan Dakin



--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>