Skip to content

Closes #637, added by.x and by.y to merge - #1155

Merged
arunsrinivasan merged 1 commit into
Rdatatable:masterfrom
blasern:merge_by.x_by.y
May 28, 2015
Merged

arunsrinivasan merged 1 commit into
Rdatatable:masterfrom
blasern:merge_by.x_by.y

Conversation

@blasern

@blasern blasern commented May 20, 2015

Copy link
Copy Markdown

No description provided.

@arunsrinivasan
arunsrinivasan merged commit d158957 into Rdatatable:master May 28, 2015
@arunsrinivasan

Copy link
Copy Markdown
Member

@blasern thanks.

@arunsrinivasan

Copy link
Copy Markdown
Member

@blasern, just realised that this line doesn't really check one case where y has column(s) identical to that of columns provided in by.x, but they are not provided in the columns to join by in by.y.

Here's an example:

require(data.table)
dt1 = data.table(w = 0, x=1:2, y=3:4, z=5:6)
dt2 = copy(dt1)
merge(dt1, dt2, by.x="z", by.y="w")
# Error in setnames(y, by.x, by.y) : 
#   Some items of 'old' are duplicated (ambiguous) in column names: z

Do you think you'd be able to patch this?

@blasern

blasern commented Jun 10, 2015

Copy link
Copy Markdown
Author

I have just submitted a pull request that should fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants