# NOT RUN {
Sys.unsetenv("LARES_FONT") # Temporal
data("iris")
df <- subset(iris, select = c(-Species))
print(head(df))
# If dataset has +5 columns, feel free to reduce dimenstionalities
# with reduce_pca() or reduce_tsne() first
# Find optimal k
check_k <- clusterKmeans(df, limit = 10)
check_k$nclusters_plot
# You can also use our other functions:
# clusterOptimalK() and clusterVisualK()
# Run with selected k
clusters <- clusterKmeans(df, k = 3)
names(clusters)
# Cross-Correlations for each cluster
plot(clusters$correlations)
# PCA Results (when dim_red = "PCA")
plot(clusters$PCA$plot_explained)
plot(clusters$PCA$plot)
# }
Run the code above in your browser using DataLab