n_dist2max {COINr} | R Documentation |
Normalise as distance to maximum value
Description
A measure of the distance to the maximum value, where the maximum value is the highest-scoring value. The formula used is:
Usage
n_dist2max(x)
Arguments
x |
A numeric vector |
Details
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.
Value
Numeric vector
Examples
x <- runif(20)
n_dist2max(x)
[Package COINr version 1.1.14 Index]