clusterVisualK | R Documentation |
Visualize cluster data for assorted values of k.
clusterVisualK(df, ks = 2:6, ...)
df |
Dataframe |
ks |
Integer vector. Which k should be tested? |
... |
Additional parameters passed to |
List. Plot and data.frame results of clustering df
data.frame into ks
integer clusters.
Other Clusters:
clusterKmeans()
,
clusterOptimalK()
,
reduce_pca()
,
reduce_tsne()
Sys.unsetenv("LARES_FONT") # Temporal
data("iris")
df <- subset(iris, select = c(-Species))
df <- df[sample(nrow(df)), ]
# Calculate and plot
result <- clusterVisualK(df, ks = 2:4)
plot(result$plot)
# You can use the data generated as well
lapply(result$data, function(x) head(x$cluster, 10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.