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

[R-Forge #2607] Filtering by logical column, combined with deleting that column doesn't perform the filter #506

Closed
arunsrinivasan opened this issue Jun 8, 2014 · 1 comment
Assignees
Labels

Comments

@arunsrinivasan
Copy link
Member

Submitted by: Matt Dowle; Assigned to: Nobody; R-Forge link

require(data.table)
DT = data.table(a=1:9, grp=1:3)

DT[ , keep := c(rep(FALSE, .N-1), TRUE), by = grp]
DT[(keep), keep := NULL][] # ignores keep

DT[, keep := c(rep(FALSE, .N-1), TRUE), by = grp]
DT[keep==TRUE, keep := NULL][] # ignores keep

DT[, keep := c(rep(FALSE, .N-1), TRUE), by = grp]
DT[(keep)][, keep := NULL][] # works
@arunsrinivasan
Copy link
Member Author

This was fixed to error by @mattdowle in commit 1316 00284c6. Closing and updating README with this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants