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
_______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
