[datatable-help] column of named vectors in data.table and possible bug

Arunkumar Srinivasan aragorn168b at gmail.com
Sun Sep 8 00:23:35 CEST 2013


Great explanation! Thank you. Got the point. 

Arun


On Saturday, September 7, 2013 at 1:42 AM, Matthew Dowle wrote:

> Just caught up with this thread.
> > is it allowed usage of having names for column vectors?
> 
> It wasn't intended, no. It would slow down grouping if it had to 
> maintain the names attribute too in the subsets. data.table is 
> intended to be used as a list of plain columns and the internals assume 
> that. names(DT$col) might exist though if data.table() has used a 
> reference to an input without taking a copy. It would then copy on 
> first := to that column and drop the names attribute at that point. 
> Which is why we might like to leave names there and just not use them.
> 
> But I'm thinking data.table() should drop names then to make this 
> cleaner. Despite that meaning a copy of the vector has to be taken if 
> it has names. A copy is taken currently anyway. But in GNU R 3.1.0, 
> with list() no longer copying named inputs, we can do more on that front.
> 
> Matthew 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20130908/0f045dad/attachment.html>


More information about the datatable-help mailing list