enve df2dist

Share:

Description

Transform a dataframe (or coercible object, like a table) into a 'dist' object.

Usage

1
2
enve.df2dist(x, obj1.index = 1, obj2.index = 2, dist.index = 3, 
    default.d = NA, max.sim = 0)

Arguments

x

A table (or coercible object) with at least three columns: (1) ID of the object 1, (2) ID of the object 2, and (3) distance between the two objects.

obj1.index

Index of the column containing the ID of the object 1.

obj2.index

Index of the column containing the ID of the object 2.

dist.index

Index of the column containing the distance.

default.d

Default value (for missing values)

max.sim

If not-zero, assumes that the values are similarity (not distance) and this is the maximum similarity (corresponding to distance 0). Applies transformation: distance = (max.sim - values)/max.sim.

Value

Returns a 'dist' object.

Author(s)

Luis M. Rodriguez-R [aut, cre]

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.