R it has always been incorrect to call
order() on a
data.frame. Such a call doesn’t return a sort-order of the rows, and previously did not return an error. For example.
##  5 6 12 1 2 11 3 4 10 9 8 7
Notice the above result has more than 6 items, so it is not a row order. It appears there is a desire to make this sort of mal-use signalling, and it is now available as an optional error-check. In fact we are starting to see packages kicked-off
CRAN for not fixing this issue.
Recent CRAN package removals (from CRANberries, triggered by failing to respond when contacted to fix the
order() error, (error resolves as “cannot xtfrm data frames”) include:
For example, we can calculate a row order as follows.
##  6 5 2 1 4 3
And use such an order to sort data rows.
orderv(d) is shorthand for
do.call(base::order, as.list(d)), which places the columns of the
data.frame as the
...-arguments of the
Edit: an earlier great fix can be found here.
Data Scientist and trainer at Win Vector LLC. One of the authors of Practical Data Science with R.