Skip to contents

Print the Results of Clustering

Usage

# S3 method for class 'tna_clustering'
print(x, ...)

Arguments

x

A tna_clustering object.

...

Additional arguments passed to the generic print method.

Value

x (invisibly).

Examples

data <- data.frame(
  T1 = c("A", "B", "A", "C", "A", "B"),
  T2 = c("B", "A", "B", "A", "C", "A"),
  T3 = c("C", "C", "A", "B", "B", "C")
)

# PAM clustering with optimal string alignment (default)
result <- cluster_sequences(data, k = 2)
print(result)
#> Clustering method: pam 
#> Number of clusters: 2 
#> Silhouette score: 0.4345238 
#> Cluster sizes:
#> 1 2 
#> 3 3