Computes the silhouette widths. If the dataset is sufficiently small for the
cluster::silhouette
implementation to work, this will be used. Otherwise a
slower chunked implementation is used.
Examples
# generate dummy data
m <- matrix(rnorm(100*3),ncol=3)
labels <- sample.int(3,100,replace=TRUE)
# calculate SWs:
sw <- silhouetteWidths(m, labels)