rank.dist: Rank a Vector of Distance Values

Description Usage Arguments Value

Description

This function computes the ranks of a vector of distance values. The resulting array will contain normalized ranks in [0, 1]. NA distances are allowed and will receive ranks > 1. If the smallest non-NA distance in X is 0, all such distances will receive rank 0. The largest non-NA distance in X will receive rank 1. If the smallest non-NA distance in X is larger than zero, it will be assigned a value in (0,1), namely its raw rank divided by the maximum rank.

Usage

1
rank.dist(X, na.value = 2)

Arguments

X

the array of distance values

na.value

the value to be used for NA distances. since all "normal" distances will be normalized into [0, 1], a value bigger than that would make sense, say 2 or +Inf.

Value

an array with normalized distance ranks


thomasWeise/distanceR documentation built on May 14, 2019, 7:35 a.m.