# NOT RUN {
options("lares.font" = NA) # Temporal
data(dft) # Titanic dataset
df <- subset(dft, select = -c(Ticket, PassengerId))
# Find optimal k
check_k <- clusterKmeans(df)
check_k$nclusters_plot
# Run with selected k
clusters <- clusterKmeans(df, k = 3)
names(clusters)
# Cross-Correlations for each cluster
plot(clusters$correlations)
# PCA Results
plot(clusters$PCA$plotVarExp)
plot(clusters$PCA$plot_1_2)
# }
# NOT RUN {
# 3D interactive plot
clusters$PCA$plot_1_2_3
# }
Run the code above in your browser using DataLab