[R] Merging data.frames

Paul Boutros pcboutro at engmail.uwaterloo.ca
Fri Nov 8 22:05:35 CET 2002


Is it possible to combine two data-frames, just taking the rows where
these frames have equivalent names?
So for example I would want to take:

d1:
  val1 val2
A  1    2
B  3    4
C  5    6

and d2:
  val3 val4
A  1    4
C  2    5
D  3    6

to merge into:
  val1 val2 val3 val4
A  1    2    1    4
C  5    6    2    5

Is this kind of "merge on equal rows" to create a subset of the two
data-frames possible in R, or would I need to move to an altnerate
lagnauge to do this?

Thanks for any ideas!
Paul

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list