On Mon, Mar 7, 2011 at 8:50 PM, Matthew Dowle <[email protected]> wrote: > Btw : > >> a small utility at the C level to scan through the levels() of >> factor-keys to test for them being in order and >> breaking/short-circuiting as soon as it finds one level that's out of >> order? > > That's base::is.unsorted(), which is done in C.
Aww -- was looking forward to writing some C code ... It looks like you were right, though -- the problematic data.table has a (factor) key where `is.unsorted(levels(the_key_column))` is TRUE. So I guess we're talking about having something like options(datatable.check.factor.levels=TRUE) check at the top of the [.data.table function that fires a warning() when the levels are unsorted, yeah? -steve -- 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 _______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
