We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
An example:
library(data.table) DT0 <- data.table( patient.id = c(1L, 2L, 1L, 1L, 2L, 2L, 2L), h.date = as.Date(c("2013/10/15", "2014/10/15", "2015/7/16", "2016/1/7", "2015/12/20", "2015/12/25", "2016/2/10"))) setorder(DT0) DT0[, `:=`(start.date = h.date - 365, end.date = h.date)] # works: DT0[DT0, on = .(patient.id, h.date >= start.date, h.date <= end.date), .(x.h.date, patient.id, i.start.date, i.end.date, g = .GRP, .N) , by=.EACHI] # fails: DT0[DT0, on = .(patient.id, h.date >= start.date, h.date <= end.date), .(patient.id, i.start.date, i.end.date, g = .GRP, .N, x.h.date) , by=.EACHI] # Error in `[.data.table`(DT0, DT0, on = .(patient.id, h.date >= start.date, : # object 'x.h.date' not found
I see this result just from reordering the second line of the call -- the columns in j.
j
(Example from SO. I tried to come up with something simpler but couldn't figure it out.)
The text was updated successfully, but these errors were encountered:
x. prefixes during joins work properly, closes #2313
b81a379
x. prefixes during joins work properly, closes #2313 (#2583)
b336e75
arunsrinivasan
Successfully merging a pull request may close this issue.
An example:
I see this result just from reordering the second line of the call -- the columns in
j
.(Example from SO. I tried to come up with something simpler but couldn't figure it out.)
The text was updated successfully, but these errors were encountered: