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
Behaviour when j has undefined columns and i-operation leads to 0-length. #1002
Here is something a little closer to the actual usecase. I don't think either should be an error, but if the second one is, then the first one should be too, IMO
DT[J(3), b := 1L, nomatch=0L] # no error
DT[J(3), d:=b + 2, nomatch=0L] # error
#Error in eval(expr, envir, enclos) : object 'b' not found
When nomatch=NA, both expressions return an error (as expected). And otherwise, there's no rows to evaluate on. So j-exp is not looked at all = no error (as expected).
Activity
gsee commentedon Jan 12, 2015
Here is something a little closer to the actual usecase. I don't think either should be an error, but if the second one is, then the first one should be too, IMO
arunsrinivasan commentedon Jan 12, 2015
No error makes more sense to me too (also, consistency with subset behaviour is better - as subsets and joins are very related under
[).arunsrinivasan commentedon Nov 8, 2015
Seems to have been fixed in v1.9.6...
arunsrinivasan commentedon Mar 9, 2016
When
nomatch=NA, both expressions return an error (as expected). And otherwise, there's no rows to evaluate on. Soj-expis not looked at all = no error (as expected).The error on NA is very likely due to #759 fix.
DT[NA] returns one all-NA row again, while retaining fix that DT[some…