powered by
A measure of the distance to the maximum value, where the maximum value is the highest-scoring value. The formula used is:
n_dist2max(x)
Numeric vector
A numeric vector
$$ 1 - (x_{max} - x)/(x_{max} - x_{min}) $$
This means that the closer a value is to the maximum, the higher its score will be. Scores will be in the range of 0 to 1.
x <- runif(20) n_dist2max(x)
Run the code above in your browser using DataLab