Re: [R] Matching pairs from two data frame

From: solea <laffargue_pascal_at_yahoo.fr>
Date: Tue, 08 Apr 2008 00:35:09 -0700 (PDT)

.... a so simple solution ... thanks a lot !

Henrique Dallazuanna wrote:

> 
> Try:
> 
> merge(DATA1, DATA2)
> 
> On Mon, Apr 7, 2008 at 11:20 AM, solea <laffargue_pascal_at_yahoo.fr> wrote:
> 

>>
>> I am looking for a solution to match 2 dataframes from pairs of values (x
>> and
>> y) as indicated thereafter :
>>
>> First dataframe :
>> DATA1
>> x y a
>> 1 30 40 0.2
>> 2 21 130 0.3
>>
>> Second dataframe
>> DATA2
>> x y b
>> 1 30 40 1
>> 2 40 30 3
>> 3 20 40 7
>> 4 11 30 2
>> 5 130 250 15
>> 6 21 130 17
>>
>> expected Results :
>>
>> DATA3
>> x y a b
>> 1 30 40 0.2 1
>> 2 21 130 0.3 17
>>
>> Many thanks in advance fo your help
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Matching-pairs-from-two-data-frame-tp16537467p16537467.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help_at_r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> 
> 
> 
> -- 
> Henrique Dallazuanna
> Curitiba-Paraná-Brasil
> 25° 25' 40" S 49° 16' 22" O
> 
> 	[[alternative HTML version deleted]]
> 
> 
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: http://www.nabble.com/Matching-pairs-from-two-data-frame-tp16537467p16548091.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 08 Apr 2008 - 08:37:11 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 08 Apr 2008 - 09:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive