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 #5571] complicated by expression can hide column if .SD is present #484

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

Comments

@arunsrinivasan
Copy link
Member

Submitted by: Eduard Antonyan; Assigned to: Nobody; R-Forge link

A bunch of specific things have to happen for this bug - when the by expression includes a column, that column disappears in the j-expression if .SD is also used in the j-expression:

require(data.table)
dt = data.table(a = 1, b = 1)
dt[, data.table(a, .SD), by = cumsum(a)]
# Error in data.table(a, .SD) : object 'a' not found

Expressions that work:

dt[, data.table(a, .SD), by = a]
dt[, data.table(b, .SD), by = cumsum(a)]
dt[, data.table(a, b), by = cumsum(a)]
@MichaelChirico
Copy link
Member

Should be a lot easier to handle now that we've got .SDall, right?

@arunsrinivasan arunsrinivasan added this to the v1.9.8 milestone Mar 18, 2016
@arunsrinivasan arunsrinivasan self-assigned this Mar 18, 2016
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