Wolfram Language

Reverse Order

Frequently you need to sort lists of objects in the reverse order to that used by Sort and SortBy. Version 12 introduces the new functions ReverseSort and ReverseSortBy to simplify that operation.

For example, in the result of the function Tally, one is usually interested in the elements with the highest tally. Hence you need to reverse sort those results by the tally. Count how many countries there are in each continent.

Another useful application is sorting datasets by a given column. Take the example of planets.

Sort them by radius, from the largest to the smallest.

Related Examples

de es fr ja pt-br zh