getKmeans: Obtain object of class 'kmeans'

getKmeansR Documentation

Obtain object of class kmeans

Description

Extracts an object of class kmeans as described in ?stats::kmeans.

Usage

getKmeans(object, ...)

## S4 method for signature 'Clustering'
getKmeans(object, k, method_kmeans = "Hartigan-Wong", stop_if_null = TRUE)

## S4 method for signature 'Analysis'
getKmeans(object, k, method_kmeans = "Hartigan-Wong", stop_if_null = TRUE)

## S4 method for signature 'ClusteringKmeans'
getKmeans(object, k, method_kmeans = "Hartigan-Wong", stop_if_null = TRUE)

Arguments

object

Any object for whose class a method has been defined.

k

Numeric value. Denotes the number of clusters. Must be bigger than 1. Must not be bigger than the number of observations of the data set.

stop_if_null

Logical value. If TRUE and the function does not find the object to extract an informative error is raised. Else the empty value - usually NULL - is returned.

Value

An object of class kmeans.

See Also

getClusteringKmeans()


kueckelj/confuns documentation built on June 28, 2024, 9:19 a.m.