<div>
Great explanation! Thank you. Got the point.
</div>
<div><div><br></div><div>Arun</div><div><br></div></div>
<p style="color: #A0A0A8;">On Saturday, September 7, 2013 at 1:42 AM, Matthew Dowle wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div>Just caught up with this thread.</div><blockquote type="cite"><div>is it allowed usage of having names for column vectors?</div></blockquote><div>It wasn't intended, no. It would slow down grouping if it had to </div><div>maintain the names attribute too in the subsets. data.table is </div><div>intended to be used as a list of plain columns and the internals assume </div><div>that. names(DT$col) might exist though if data.table() has used a </div><div>reference to an input without taking a copy. It would then copy on </div><div>first := to that column and drop the names attribute at that point. </div><div>Which is why we might like to leave names there and just not use them.</div><div><br></div><div>But I'm thinking data.table() should drop names then to make this </div><div>cleaner. Despite that meaning a copy of the vector has to be taken if </div><div>it has names. A copy is taken currently anyway. But in GNU R 3.1.0, </div><div>with list() no longer copying named inputs, we can do more on that front.</div><div><br></div><div>Matthew</div></div></div></span>
</blockquote>
<div>
<br>
</div>