Hello,
I think this was recently introduced because this example comes from a part of my codes double and triple checked in the past several times (I mean I should have noticed before, maybe..):
<pre>
data<-data.table(code = c(rep("A",26L), rep("B",10L)),
id = c(rep(1L, 20L), rep(2L, 6L), rep(1L, 10L)),
date = structure(c(14602, 14638, 14665, 14698, 14726, 14754, 14788, 14817, 14846, 14882,
14939, 15005, 15029, 15064, 15091, 15125, 15153, 15328, 15393,
15393, 15393, 15393, 15431, 15461, 15569, 15569, 14613, 14762,
15110, 15110, 15686, 15686, 14602, 14638, 14665, 14698),
class = "Date"))
filter <- data.table(code = c("A", "B"),
id = c(2L, 1L),
limit1 = structure(c(15564, 15681), class = "Date"),
limit2 = structure(c(15574, 15691), class = "Date"),
index_R = c(26610L, 22662L))
setkey(data)
setkey(filter, code, id, limit1)
> filter[data, nomatch=0, roll=T]
code id limit1 limit2 index_R
1: A 2 2012-02-23 2012-08-22 26610
2: A 2 2012-02-23 2012-08-22 26610
3: A 2 2012-08-17 2012-12-17 22662
4: A 2 2012-08-17 2012-12-17 22662
5: B 1 2011-05-16 2012-08-22 26610
6: B 1 2011-05-16 2012-08-22 26610
7: B 1 2012-12-12 2012-12-17 22662
8: B 1 2012-12-12 2012-12-17 22662
>
> # expected outpit - workaround using any column from X which is never NA (before doing X[Y, roll=T])
> filter[data, roll=T][!is.na(index_R)]
code id limit1 limit2 index_R
1: A 2 2012-08-17 2012-08-22 26610
2: A 2 2012-08-17 2012-08-22 26610
3: B 1 2012-12-12 2012-12-17 22662
4: B 1 2012-12-12 2012-12-17 22662
</pre>
btw I'm on 1.9.3, the commit right before the by without by was sadly removed (sadly cause I would need at least a whole week to change all my codes...<img class='smiley' src='http://n4.nabble.com/images/smiley/anim_working.gif' />)
Can you guys reproduce this? Is it already fixed?
Regards,
Michele.
<br/><hr align="left" width="300" />
View this message in context: <a href="http://r.789695.n4.nabble.com/Roll-nomatch-mixes-result-tp4689968.html">Roll + nomatch mixes result</a><br/>
Sent from the <a href="http://r.789695.n4.nabble.com/datatable-help-f2315188.html">datatable-help mailing list archive</a> at Nabble.com.<br/>