From tlumley@u.washington.edu  Fri May  3 17:06:14 2002
From: tlumley@u.washington.edu (Thomas Lumley)
Date: Fri, 3 May 2002 09:06:14 -0700 (PDT)
Subject: [Rd] merge (PR#1510)
In-Reply-To: <200205031442.QAA16928@pubhealth.ku.dk>
Message-ID: <Pine.A41.4.44.0205030859300.100836-100000@homer39.u.washington.edu>

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] merge (PR#1510)
Thomas Lumley