View source: R/cluster_distance.R
cluster_dist | R Documentation |
Calculate the distance matrix for a czek_matrix with clustering result or a data set with its clustering labels.
cluster_dist(x, y, distfun = dist, dist_method = "average")
x |
A data set or a matrix with class czek_matrix. |
y |
If x is the data set, y is the cluster label. |
distfun |
Specifies which distance function should be used. |
dist_method |
Four linkage criteria: single, complete, average and SSD. |
A distance matrix.
# Clustering Result on czek_matrix x = czek_matrix(iris[,-5], cluster = TRUE, num_cluster = 3) dist_czek = cluster_dist(x) plot(czek_matrix(dist_czek)) # Clustering Result on a Data Set with Clustering Labels dist_data = cluster_dist(x = iris[,-5], y = iris$Species) plot(czek_matrix(dist_data))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.