Code:
plot.data <- bind_cols(data.norm, Cluster =
as.factor(result$cluster))
plot.centres <- as.data.frame(result$centers)
plot.centres$Cluster <- rownames(result$centers)
ggplot(plot.data) + aes(x = RI, y = Si, color = Cluster) +
geom_point() +
geom_point(data = plot.centres, shape=8, size =4)
It gives the error:
Error in FUN(X[[i]], ...) : object 'RI' not found
I have installed the RI package but it still does not help.