print.net_clustering: Print Method for net_clustering

View source: R/cluster_data.R

print.net_clusteringR Documentation

Print Method for net_clustering

Description

Compact, fixed-width summary of a sequence-clustering result. The header carries the clustering method and dissimilarity; the per-cluster table carries cluster size (count and percentage) and mean within-cluster distance when available. Optional medoid and covariate lines surface only when those fields are populated.

Usage

## S3 method for class 'net_clustering'
print(x, digits = 3L, ...)

Arguments

x

A net_clustering object.

digits

Integer. Decimal places used for floating-point statistics in the printout. Default 3. Non-breaking: existing print(x) calls keep their previous formatting.

...

Unsupported. Supplying unused arguments raises an error.

Value

The input object, invisibly.

Examples

seqs <- data.frame(V1 = c("A","B","C","A","B"), V2 = c("B","C","A","B","A"),
                   V3 = c("C","A","B","C","B"))
cl <- build_clusters(seqs, k = 2)
print(cl)

set.seed(1)
seqs <- data.frame(
  V1 = sample(c("A","B","C"), 20, TRUE),
  V2 = sample(c("A","B","C"), 20, TRUE),
  V3 = sample(c("A","B","C"), 20, TRUE)
)
cl <- build_clusters(seqs, k = 2)
print(cl)



Nestimate documentation built on July 11, 2026, 1:09 a.m.