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
I tested on an earlier version of 1.9.7 and the second approach worked. After upgrading, only the third one worked, so I guess it is thanks to a recent change.
This is the first time I've seen data.table:::g[`` or any function named like that.
The text was updated successfully, but these errors were encountered:
Detected that j uses these columns: Date
Finding groups (bysameorder=FALSE) ... done in 0secs. bysameorder=TRUE and o__ is length 0
lapply optimization is on, j unchanged as 'list(.I[1L], Date[1L])'
GForce optimized j to 'list(g[(.I, 1L), g[(Date, 1L))'
No error with DT[ , .(Date[1L]), by = .(Name, rleid(Level))], nor from DT[ , .(I[1L]), by = .(Name, releid(Level))].
From examining the verbose output, it seems like GForce is turned on for when j = .(Date[1L]), but not for when j = .(I[1L]).
Going a bit further, the line in [.data.table that causes the error is ans = eval(jsub, thisEnv), where jsub is substitute(list(g[(.I, 1L),g[(Date, 1L))). But thisEnv doesn't have the variable .I in it, probably for the same reason GForce isn't activated when we just use .I by itself.
Question is, why isn't GForce activated for DT[ , .I[1L], by = V1], but is for DT[ , .(.I[1L], Date[1L]), by = V1]?
Ran into this on SO:
I tested on an earlier version of 1.9.7 and the second approach worked. After upgrading, only the third one worked, so I guess it is thanks to a recent change.
This is the first time I've seen
data.table:::
g[`` or any function named like that.The text was updated successfully, but these errors were encountered: