R/k_means_stats.R

Defines functions axe_fitted.kmeans axe_data.kmeans

#' K-means via stats
#'
#' [k_means()] creates K-means model. This engine uses the classical definition
#' of a K-means model, which only takes numeric predictors.
#'
#' @includeRmd man/rmd/k_means_stats.md details
#'
#' @name details_k_means_stats
#' @keywords internal
NULL

# See inst/README-DOCS.md for a description of how these files are processed

# @export - onLoad
axe_data.kmeans <- function(x, verbose = FALSE, ...) {
  attr(x, "training_data") <- NULL
  add_butcher_class(x)
}

# @export - onLoad
axe_fitted.kmeans <- function(x, verbose = FALSE, ...) {
  x$cluster <- integer(0)
  add_butcher_class(x)
}

Try the tidyclust package in your browser

Any scripts or data that you put into this service are public.

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