...: arguments treated as a list of vectors to be ordered in proper order, based upon the mechanism by base::order(), and as such data.frame is equivalent to a list.
decreasing: logical, default FALSE, used to reverse the sort order.
blanksFirst, na.last, keepNegative, keepInfinite, keepDecimal, ignore.case, useCaseTiebreak, sortByName: arguments passed to mixedOrder(), except sortByName which is not passed along.
NAlast: logical deprecated in favor of argument na.last
for consistency with base::sort().
honorFactor: logical, default TRUE, used to enforce factor level sort order, when FALSE it sorts as character.
verbose: logical indicating whether to print verbose output, passed as verbose - 1 to mixedOrder().
matrixAsDF: logical if ... supplies only one matrix object, then matrixAsDF=TRUE will cause it to be converted to a data.frame, then coerce to a list before processing. By default, in the event only one matrix object is supplied, this conversion is performed, in order to define a sort order based upon each column in order, consistent with behavior of data.frame input.
Returns
integer vector of row orders
Details
This function is a minor extension to mixedOrder(), "multiple mixedOrder()", which accepts list input, similar to how base::order() operates. This function is mainly useful when sorting something like a data.frame, where ties in column 1 should be maintained then broken by non-equal values in column 2, and so on.
This function essentially converts any non-numeric column to a factor, whose levels are sorted using mixedOrder(). That factor is converted to numeric value, multiplied by -1
when decreasing=TRUE. Finally the list of numeric vectors is passed to base::order().
In fact, mixedSortDF() calls this mmixedOrder() function, in order to sort a data.frame properly by column.
See mixedOrder() and mixedSort() for a better description of how the sort order logic operates.