scclust (version 0.2.2)

cluster_count: Count the number of clusters

Description

cluster_count returns the number of clusters in a clustering.

Usage

cluster_count(clustering)

Value

Returns an integer with the number of clusters in clustering.

Arguments

clustering

a scclust object containing a non-empty clustering.

Examples

Run this code
# 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 DataCamp Workspace