# Iris data
# Loading the numeric variables of iris data
iris <- as.matrix(iris[,-5])
#standardizing the data
iris <- scale(iris)
#applying a clustering algorithm
drclust_out <- dpcakm(iris, 20, 3)
#silhouette based on the data and the output of the clustering algorithm
d <- silhouette(iris, drclust_out)
Run the code above in your browser using DataLab