glance.cluster_fit: Construct a single row summary "glance" of a model, fit, or...

View source: R/tidy.R

glance.cluster_fitR Documentation

Construct a single row summary "glance" of a model, fit, or other object

Description

This method glances the model in a tidyclust model object, if it exists.

Usage

## S3 method for class 'cluster_fit'
glance(x, ...)

Arguments

x

model or other R object to convert to single-row data frame

...

other arguments passed to methods

Value

A one-row tibble with model-level summary statistics such as total within-cluster sum of squares, between-cluster sum of squares, and number of iterations. Support depends on the underlying engine.

Examples

# glance() support depends on the underlying engine.
## Not run: 
kmeans_fit <- k_means(num_clusters = 3) |>
  set_engine("stats") |>
  fit(~., mtcars)

glance(kmeans_fit)

## End(Not run)

tidyclust documentation built on June 20, 2026, 9:08 a.m.