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.