This might be a bug. In that case, I will delete this question and report as bug. I would like someone to take a look to make sure I'm not doing something incorrectly so I don't waste the developer time.
test = data.table(mo=1:100, b=100:1, key=c("mo", "b"))
mo = 1
test[J(mo)]
That returns the entire test
data.table instead of the correct result returned by
test[J(1)]
I believe the error might be coming from test
having the same column name as the table which is being joined by, mo
. Does anyone else get the same problem?