Thanks for all of the help!<br><br>By coercing numerics to integers ahead of their usage in data.table, this has saved a good bit of time. That may be difficult to determine a priori, though: it's conceivable that a user may merge two objects, one that has a variable that uses only integer values (but type is numeric), another with a full range of fractional values (i.e. continuous, type is numeric).<br>
<br>In any case, as I have a number of merges, sometimes reusing some of the same input tables, this coercion had a pretty good speedup.<br><br>Continuing....<br><br>> I've managed to get the code to proceed correctly by replacing the "myDT[,<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> newCol := oldCol]" with:<br>
><br>
> tmpCol = myDT$oldCol<br>
> myDT$newCol = tmpCol<br>
><br>
> This has avoided the issue.<br>
<br>
</div>Yes, makes sense. Is myDT the result from a merge()? Or, have you changed<br>
column names before that point using names(myDT)<-, colnames(myDT) or<br>
similar?<br></blockquote><div><br><br>I had two successive merges. I also did things like myDT[, newCol := oldCol] and myDT[, oldCol := NULL]. I do simple things like this to rename columns, but I suppose I should use names(). I take advantage of lazy evaluation and promises. :)<br>
<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im"><br>
</div>$ is copying the whole table, and always will. Once Chris crash bug is<br>
fixed, please change back to :=. </blockquote><div><br>Will do, thanks!<br><br><br></div></div>