powered by
cluster_count returns the number of clusters in a clustering.
cluster_count
cluster_count(clustering)
Returns an integer with the number of clusters in clustering.
clustering
a scclust object containing a non-empty clustering.
scclust
# Example scclust clustering my_scclust <- scclust(c("A", "A", "B", "C", "B", "C", "C", "A", "B", "B")) cluster_count(my_scclust) # > 3
Run the code above in your browser using DataLab