| dist2sim {rdiversity} | R Documentation |
Distance to similarity
Description
Converts distance objects into similarity objects.
Usage
dist2sim(dist, transform, k = 1, normalise = TRUE, max_d)
Arguments
dist |
object of class |
transform |
object of class |
k |
scaling parameter |
normalise |
object of class |
max_d |
object of class |
Details
Distances can be transformed either *linearly* or *exponentially*. That is
1 - k * dist for non-negative values, or exp(-k * dist),
respectively. If normalise is true, then dist = dist/max_d.
Value
dist2sim(x) returns an object of class similarity.
[Package rdiversity version 2.2.0 Index]