[R] merge
juli g. pausas
juli at ceam.es
Fri Apr 19 12:50:22 CEST 2002
Dear R-users,
I'm trying to merge 2 data.frames that have different number of rows,
with a common column. Is this possible? Here a simple exemple, with the
error that I get:
a <- 1:20
b <- 21:40
ab <- data.frame(a, b)
a <- 1:40
c <- 41:80
ac <- data.frame(a, c)
rm(a, b, c)
zz <- merge(ab, ac, by.x=ab$a, by.y=ac$a)
Error in fix.by(by.x, x) : `by' must match numbers of columns
What's wrong? Any suggestion?
I'm using R 1.4.1 under MS windows
Thanks
Juli
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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