[R] clusplot() and fviz_cluster() functions

Marco Besozzi m@rco@be@o48 @end|ng |rom gm@||@com
Mon Nov 4 18:32:54 CET 2019


Can't understand why with clusplot() and fviz_cluster() functions I obtain
two x-axis mirror graphs. That's the code...


*mydata <- USArrests*













*z <- scale(mydata)## clustering MacQueen (k-means )#fit <- kmeans(z, 4,
algorithm = c("MacQueen"), nstart=50)#library(cluster)windows()clusplot(z,
fit$cluster, labels=3, lines=0, cex=0.6, col.txt="black",
col.p="black")#library(factoextra)windows()fviz_cluster(fit, data=z)#*

Thanks if someone has a suggestion!

---------------------------------------------------------------
Marco Besozzi, MD
---------------------------------------------------------------

	[[alternative HTML version deleted]]



More information about the R-help mailing list