Description Usage Arguments Value
Rank the elements in the set data based on binary
comparisons via a comparator function. The function
comparator accepts two parameters, a and b, which will
be two elements from data. The function then returns a negative if
the first element (a) should receive a lower rank than the second
element (b). It returns a positive value if b should be
ranked smaller than a. It in all other cases (i.e., if 0 or
NaN are returned), neither element is preferred.
1 | rank.by.comparison(data, comparator)
|
data |
the data set, a list or vector of data elements |
comparator |
a binary comparator function |
a vector of ranks
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.