runKmeansClustering | R Documentation |
A wrapper around the Kmeans clustering algorithm. Iterates over all
combinations of ks
and methods_kmeans
and stores the resulting clustering
variables in the feature data.frame.
runKmeansClustering(
object,
ks,
methods_kmeans = "Hartigan-Wong",
prefix = "K",
naming = "{method_kmeans}_k{k}",
n_pcs = NULL,
overwrite = TRUE,
...
)
object |
An object of class |
ks |
Numeric vector. Denotes all options for k-clusters over which
to iterate. Values <1 are discarded. (Givent o |
methods_kmeans |
A character vector of kmeans methods. Should be one
or more of c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen"). (Given to |
naming |
A |
n_pcs |
Integer value. The number of principal components to use for the clustering. |
overwrite |
Logical value. Must be |
... |
Additional arguments given to |
The updated input object, containing the added, removed or computed results.
getFeatureDf()
, getFeatureNames()
, getGroupingOptions()
,
getGroupNames()
library(SPATA2)
data("example_data")
object <- example_data$object_UKF269T_diet
object <- runPCA(object, n_pcs = 20)
object <- runKmeansClustering(object, ks = 3:10, n_pcs = 20)
getFeatureNames(object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.