[R] clusplot() and fviz_cluster() functions

Sarah Goslee @@r@h@go@|ee @end|ng |rom gm@||@com
Mon Nov 4 19:04:33 CET 2019


The orientation of a principal components axis is entirely arbitrary,
and can vary with implementation. It doesn't matter at all.

Your code was hugely mangled by posting in HTML - see below.

Sarah

On Mon, Nov 4, 2019 at 12:33 PM Marco Besozzi <marco.beso48 using gmail.com> wrote:
>
> 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]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



-- 
Sarah Goslee (she/her)
http://www.numberwright.com



More information about the R-help mailing list