getDistMatrix: A generic function for implementing various distance metrics

View source: R/clusterUtils.R

getDistMatrixR Documentation

A generic function for implementing various distance metrics

Description

To avoid writing too much code when i want to try a different distance function i want a generic function that will be set up appropriately with the right parameters (not specified before)

Usage

getDistMatrix(
  binMat,
  distMetric = list(name = "euclidean", valNA = NULL, rescale = F)
)

Arguments

binMat

A matrix of numbers for which you want to calculate the distance between rows #' @param valNA Value to give NAs in matrix

distMetric

List continaing the name of the metric and the values of any parameters the metric nromally takes.

Value

A distance object (lower triangle) with the distances between all rows of the input matrix


jsemple19/EMclassifieR documentation built on Aug. 12, 2022, 2:57 p.m.