You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
filter is mistaken, I think, since DT[.(pred1, pred2)] attempts a join. This could be resolved by translating filter(pred1, pred2) to DT[pred1 & pred2] (maybe optimized by auto-indexing Extend auto indexing to multiple columns Rdatatable/data.table#1453) or DT[pred1][pred2]
I did not test, but "mutate() allows to refer to variables that you just created" also applies to summarise(), which may also need a fix (eg mtcars %>% group_by(cyl) %>% summarise(n = n(), nfrac = n/nrow(.)))
The text was updated successfully, but these errors were encountered:
I've fixed the translation for filter() so that it now reduces with &. Generate multiple calls [] feels risky to me — it will help in the case of multiple indexable expressions, but I suspect might otherwise slow down. For now, I'll leave that optimisation up to data.table.
Some thoughts re Rdatatable/data.table#3641 (comment) :
filter
is mistaken, I think, sinceDT[.(pred1, pred2)]
attempts a join. This could be resolved by translatingfilter(pred1, pred2)
toDT[pred1 & pred2]
(maybe optimized by auto-indexing Extend auto indexing to multiple columns Rdatatable/data.table#1453) orDT[pred1][pred2]
.SD
inj
Rdatatable/data.table#735mtcars %>% group_by(cyl) %>% summarise(n = n(), nfrac = n/nrow(.))
)The text was updated successfully, but these errors were encountered: