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
{{ message }}
Repository navigation
Right-hand side of := assignment should not be evaluated when auto.index=TRUE #1001
If auto.index is TRUE, the RHS of := is evaluated even if there are zero rows in the subset.
packageVersion('data.table')
#[1] ‘1.9.5’
options(datatable.auto.index=TRUE)
DT<- data.table(a=1:2)
DT[a==3, b:=d+1]
# Error in eval(expr, envir, enclos) : object 'd' not found
Since DT[a==3] above returns a zero row data.table, there is nothing to assign in the j expression, so it should not be evaluated. This did not throw an exception in 1.9.3 and does not throw an exception if auto.index is turned off.
Activity
arunsrinivasan commentedon Jan 12, 2015
I've restored old behaviour for subset operations. But I'm not sure if it shouldn't error. Opened #1002.
DT[NA] returns one all-NA row again, while retaining fix that DT[some…