New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-Forge #5008] .SD drops columns if name is duplicated #86

Closed
arunsrinivasan opened this Issue Jun 8, 2014 · 1 comment

Comments

Projects
None yet
1 participant
@arunsrinivasan
Member

arunsrinivasan commented Jun 8, 2014

Submitted by: Ricardo Saporta; Assigned to: Arun ; R-Forge link

When duplicate column names exist, .SD drops columns

DT <- data.table(x=1:3, x=11:13)

## Works Fine
DT[, names(DT)=="x", with=FALSE]

## Looses Second Column
DT[, names(DT)=="x", with=FALSE][, .SD]
@arunsrinivasan

This comment has been minimized.

Show comment
Hide comment
@arunsrinivasan

arunsrinivasan Jun 19, 2014

Member

Also updated this SO post and here's the commit that fixed handling duplicate names: 9f0a7f8

Member

arunsrinivasan commented Jun 19, 2014

Also updated this SO post and here's the commit that fixed handling duplicate names: 9f0a7f8

@arunsrinivasan arunsrinivasan added this to the v1.9.4 milestone Jun 19, 2014

@arunsrinivasan arunsrinivasan self-assigned this Jun 20, 2014

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