Skip to content

arg_sort

Syntax

arg_sort(list-expression)

Parameters

list-expression
An expression that evaluates to a list.

Returns

A list of indices that would sort the the given list.

Description

This action determines how to sort the given list, and then returns the list of indices that should be used to sort the list. Note that list indices in FRED are 0-based, in that 0 refers to the first item in the list.

Examples

The following example returns the list [3, 2, 0, 1], corresponding to the indices to use when sorting the list [8, 9, 10, 11].

arg_sort([10,11,9,8])

See Also