cluster_count: Count the number of clusters

Description Usage Arguments Value Examples

View source: R/scclust.R

Description

cluster_count returns the number of clusters in a clustering.

Usage

1
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

1
2
3
4
5
6
# 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 May 2, 2019, 4:04 p.m.