Determines the medoid of one or several subsets of elements using a distance matrix.
Arguments
- distances
The distance matrix used to find the medoid(s) (distance matrix).
- byName
TRUEif the returned result should be the row name corresponding to the medoid,FALSEif it should be the row number. Ignored ifdistancesis not named. (flag)- partition
The partition for which the medoids of each cluster should be determined (vector).
- clusters
The set of clusters for which the medoid should be calculated (all by default).
Value
For medoid: depending on byName, the name or the
identifier of the medoid.
For medoids_partition: a named numeric vector indicating,
for each cluster or a subset of them, the identifier of its medoid.
