[Rd] merge (PR#1510)

Thomas Lumley tlumley@u.washington.edu
Fri, 3 May 2002 09:06:14 -0700 (PDT)


On Fri, 3 May 2002 elff@rumms.uni-mannheim.de wrote:

> Full_Name: Martin Elff
> Version: 1.5.0
> OS: MS Windows 98
> Submission from: (NULL) (134.155.91.46)
>
>
> Merging of two data frames by variables with different names
> (using by.x and by.y) is no
> longer possible (it was possible in version 1.4.1).

To be precise, it doesn't seem to work with multiple by columns, so
> df<-data.frame(x=1:10,y=rnorm(10))
> fd<-data.frame(z=1:10,w=rnorm(10))
> merge(df,fd,by.x="x",by.y="z")
succeeds but
> fd<-data.frame(z=1:10,m=letters[1:10],w=rnorm(10))
> df<-data.frame(x=1:10,y=rnorm(10),n=letters[1:10])
> merge(df,fd,by.x=c("x","n"),by.y=c("z","m"))
Error in match.names(clabs, names(xi)) : names don't match previous names:
         z, m


	-thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._