Currently nomatch seems to be ignored if i in dt[i, j, nomatch = 0L] is integer. Values of i which are out of bounds or NA result in rows filled with NA:
dt = data.table(x = 1:10)
dt[c(1L, 11L, NA_integer_), x, nomatch = 0L]
> 1 NA NA
I see no reason to not support nomatch = 0L for integer i.
Also note that the current handling of negative integer i seems to be inconsistent with not-joins:
# mixing negation/not-join with nomatch
dt[-1L, nomatch = 0L] # works, nomatch ignored
dt[!list(1L), on = "x", nomatch = 0L] # exception
# negation/not-join with out-of-bounds values
dt[-11L] # warning
dt[!list(11), on = "x"] # no warning
Currently
nomatchseems to be ignored ifiindt[i, j, nomatch = 0L]is integer. Values ofiwhich are out of bounds orNAresult in rows filled withNA:I see no reason to not support
nomatch = 0Lfor integeri.Also note that the current handling of negative integer
iseems to be inconsistent with not-joins: