getDistMatrix | R Documentation |
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)
getDistMatrix( binMat, distMetric = list(name = "euclidean", valNA = NULL, rescale = F) )
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. |
A distance object (lower triangle) with the distances between all rows of the input matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.