Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

distanceMatrix

Calculate Distance Matrix


Description

Calculate the distance between all samples in a list, and return as matrix.

Usage

distanceMatrix(X, distFun, ...)

Arguments

X

list of samples, where each list element is a suitable input for distFun

distFun

Distance function of type f(x,y)=r, where r is a scalar and x and y are elements whose distance is evaluated.

...

further arguments passed to distFun

Value

The distance matrix

Examples

x <- list(5:1,c(2,4,5,1,3),c(5,4,3,1,2), sample(5))
distanceMatrix(x,distancePermutationHamming)

CEGO

Combinatorial Efficient Global Optimization

v2.4.0
GPL (>= 3)
Authors
Martin Zaefferer <mzaefferer@gmail.com>
Initial release
2019-12-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.