Skip to content
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

Bug on subset of 1-row data.table when expr returns a named logical vector #2152

Closed
arunsrinivasan opened this issue May 8, 2017 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@arunsrinivasan
Copy link
Member

@arunsrinivasan arunsrinivasan commented May 8, 2017

require(data.table)
options(datatable.auto.index=FALSE)
dt <- data.table(x=1, y="a")
val <- c(foo=1L)
dt[x == val] # returns wrong result
# Empty data.table (0 rows) of 2 cols: x,y

dt[x == unname(val)]
#    x y
# 1: 1 a
@jangorecki jangorecki self-assigned this Jun 22, 2017
@mattdowle mattdowle added the bug label Jun 30, 2017
@mattdowle mattdowle added this to the v1.10.6 milestone Jun 30, 2017
@mattdowle mattdowle closed this in 453bb2a Jun 30, 2017
mattdowle added a commit that referenced this issue Jun 30, 2017
named logical vector in i now selects expected row. Closes #2152
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants