Hy, I need an help with PCA code.
This is my dataset and I should run a PCA.
The code is:
mydata
mydata$Comune <- rownames(mydata)
mydata$Comune <- paste(mydata$Comune, mydata$Comune, sep="_")
rownames(mydata) <- mydata$Comune
mydata<- mydata[,2:7]
pca <- prcomp(mydata, center=T, scale. = T)
fviz_pca_ind(pca,
col.ind = "cos2", # Color by the quality of representation
gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
repel = TRUE)
The plot is:
how could i insert the names of the observations instead of the numbers in the plot? I dont want the point with number, I want the name of "Comune" variable on the point
THANKS FOR THE HELP!