n_dist2max: Normalise as distance to maximum value

View source: R/normalise.R

n_dist2maxR 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)


COINr documentation built on Oct. 9, 2023, 5:07 p.m.