Re: [Rd] Merge (PR#9699)

From: <ripley_at_stats.ox.ac.uk>
Date: Mon, 28 May 2007 13:57:19 +0200 (CEST)


On Mon, 21 May 2007, edward.m_at_psu.ac.th wrote:

> Full_Name: Edward McNeil
> Version: 2.5.0
> OS: Windows XP
> Submission from: (NULL) (203.170.234.5)
>
>
> This is a new bug introduced to R2.5.0.
>
> Scenario: If one of the data frames to merge contains two variables that have
> the same name, then the data in first variable (of the same name) is copied to
> the second variable in the resulting merged data frame.

This is probably

     o	<a data.frame>[i, j] could sometimes select the wrong column
 	when j is numeric if there are duplicate column names.

from NEWS and hence already fixed in R-patched.

> In R2.4.1, the second variable name is automatically renamed (in the resulting
> data frame) by adding ".1" to the end. R2.5.0 doesn't seem to do this anymore.

This is not reproducible:

A <- data.frame(x=1:3, y=4:6, y=7:9, check.names=FALSE) B <- data.frame(x=1:3, a=3:1)
merge(A, B)

works correctly in R-patched. You were asked for a reproducible example: if you have one in current R-patched, please supply it now (using PR#9699 early in your subject line).

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 28 May 2007 - 12:02:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 May 2007 - 16:34:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.