cluster_count: Count the number of clusters

View source: R/scclust.R

cluster_countR Documentation

Count the number of clusters

Description

cluster_count returns the number of clusters in a clustering.

Usage

cluster_count(clustering)

Arguments

clustering

a scclust object containing a non-empty clustering.

Value

Returns an integer with the number of clusters in clustering.

Examples

# Example scclust clustering
my_scclust <- scclust(c("A", "A", "B", "C", "B",
                        "C", "C", "A", "B", "B"))

cluster_count(my_scclust)
# > 3


scclust documentation built on Sept. 11, 2024, 6:38 p.m.