Quantcast
Channel: matching numbers in two different data frames - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by Matthew Lundberg for matching numbers in two different data frames

$
0
0

You can specify the common columns to merge, which is what must be done here.

merge(x, y, by.x='A', by.y='C', all=TRUE)   A B   D1  4 1 3442  6 2 5493  9 2  NA4 10 3 2095 15 3 631

By default, merge uses the intersection of the column names to specify the common columns between the two data frames. When there are no column names in common, or when this is the incorrect set, you must specify with by or by.x and by.y.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>