I'm proposing to have setcolorder(x) set the columns in the order specified by the keys, then remaining index columns, then the rest of the columns. I have a fork with the change already. Not sure if it would be welcome though. It makes for a nice mindless but sensible ordering to the data.
DT= data.table(a=1:3, b=2:4, c=3:5)
all.equal(names(setcolorder(DT)), c("c", "b", "a"))
Happy to make a PR if this is something that would be welcome (and sorry for the tracker spam the past few hours). Tried setting up the tests and such, but really, I have no idea what's going on with the testing framework here to be honest.
The text was updated successfully, but these errors were encountered:
What about multiple multi-column indices? there are no tests covering that.
If you are asking how to use test function in tests.Rraw it looks like you use it correctly. If you are asking about setting up test in general then use the standard R way, R CMD build . followed by R CMD check data.table_1.11.3.tar.gz.
Be sure also to read the Contributing page, which has some details about how to use test, let us know if there's some unclear points still (and, it being a wiki, feel free to edit if there's anything unclear)