On 11/09/12 12:32, Matthew Dowle wrote:
[...]
I think we want column attributes. As in: all of them. The comment is
just one attribute. R uses attributes for all sorts of sneaky things so
I think it is a bad idea if we lose some of them some of the time.
Oh I see. Please file a bug.report(package="data.table") something like:
"Column attributes (such as 'comment') are sometimes lost."
Done as #2270
[...]
we'd need setcomment() [or
setlabel(), or both] to avoid that copy; adding to the set* family.
A set attributes that allows setting column attributes may suffice.
Already exists: try setattr(). Works on anything.
Documentation says it only works for x= of type data.table. The column
of a data.table will rarely be of this type....? I think we need
setcolumnattr() or similar to do what you want. But copying a single
column is not *that* bad [1], so I suggest fixing the lost attributes is
the first priority.
Allan
[1] You would typically set the attributes when you create the column
and then leave them well alone. It is only because you keep deleting
them that I keep going back and re-setting them.
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help