ordinalRanks

fun ordinalRanks(data: DoubleArray, largestToSmallest: Boolean = false): DoubleArray

Returns the rank of each element in the supplied data as a separate array of ranks. If ranks is the returned array, then ranks0 indicates the rank of element 0 in the data array. Each element gets a unique rank based on the sorted order of the data array. Ties are handled arbitrarily based on the underlying sorting mechanism, which seems to be predicated on the "first" ranking method for the R rank() function.

This is called ordinal ranking

Parameters

largestToSmallest

if true the rankings are largest to smallest. The default is false (smallest to largest).