dist.merge: Merge Rows and Columns of a Distance Matrix According to a...

Description Usage Arguments Value See Also

Description

A list selection of vectors of indexes of rows/columns into a distance matrix is provided. A new distance matrix is created where only these selected elements remain and where the distances are aggregates of the original values.

Assume that a list list(c(1,2), c(3,4)) is provided. This will create a distance matrix containing only a single distances, namely the one between the first and second group. This distance is then the aggregate of the original distances between (1,3), (1,4), (2,3), and (2,4). The aggregate is the mean by default, but could be any statistic.

Usage

1
2
dist.merge(distObj, selection, names, aggregate = mean, cores = 1L,
  FUN.VALUE = +Inf)

Arguments

distObj

the original distance object

selection

the list of vectors selecting the matrix elements

names

the new names to be used

aggregate

the aggregate function to combine multiple distances

cores

the number of cores to be used for the computation

FUN.VALUE

the distance to be used if there are no distances for a certain combination

Value

a new distance object representing the merged distances

See Also

dist.apply.samples


thomasWeise/distanceR documentation built on May 14, 2019, 7:35 a.m.