[datatable-help] Mainting key columns after `transform`

Steve Lianoglou mailinglist.honeypot at gmail.com
Thu Mar 31 18:29:37 CEST 2011


Howdy,

Would it make sense to change `transform.data.table` to ensure that
the key columns are maintained after the `transform`-ation?

My initial thoughts is that this is "fine" (ie. won't break anything)
as long as none of the columns transformed are elements in the key --
if they are, I guess it's not clear what to do. One option is to drop
the keys at this point, another is to add a `.force.keys=TRUE/FALSE`
argument after the dots, eg:

transform.data.table <- function(`_data`, ..., .force.keys=TRUE)

which would reset the key columns to what they were, even if it
resorts the data.table.

Thoughts?

-steve

btw - and I guess whatever makes sense to do here would also make
sense to do in the `within.data.table` function as well.


-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact


More information about the datatable-help mailing list