<div dir="ltr">Thank you for the great work you do on data.table and for being so active in publicly (SO) answering users question and in giving tips/advice.<br><br>Every so often I need to go back to research scripts and get them updated to newer versions of data.table which is a major PITA, updating hardly ever goes smoothly (ie: from 1.8.8 to 1.8.11 was no fun) and updating to the most recent from a 1.8.11 wasn't either but it can sure be worth it!<br><br>One of the tasks I do is propagating calculated values from unique entries to the remaining group members. The propagation routine broke after updating `data.table` and forced me (again) to look at the routine. Thankfully it wasn't too bad to get a working command. Then, as you know, it was time to give a little tweaking for performance.<br><br>This is where the WIN comes in.<br><br>Altering the main propagation command<div><br>from:</div><div>dt[,(vcols):=cbind(dtG,dtV)[dt,roll=TRUE][,vcols,with=FALSE]][,ugid:=NULL]<br><br></div><div>to:</div><div>dt[,(vcols):=dtG[,(vcols):=dtV][dt[,.(id)],roll=TRUE][,id:=NULL]][,ugid:=NULL]</div><div><br></div><div>yielded a mean time (in seconds) change <br>from: 30053.231 <br>to: <drum roll> 1367.989 !!!!!<br><br>Notice the elimination of the cbind, the dt[.(id)] instead of dt for the rolling join and no more selecting the columns using 'with=FALSE'.</div><div><br></div><div>Very cool! Thank you again for what you do!<br><br>--<br>Sincerely,<br>Thell<br><div>
</div></div></div>