I'm trying to draw a graph for a PCA analysis. This is my example R code:
library(dplyr)
data <- starwars
db_quali <- as.data.frame(starwars[,4:6])
db_quanti <- as.data.frame(starwars[,2:3])
pca_table <- PCAmix(X.quanti = db_quanti,
X.quali = db_quali,
rename.level=TRUE,
graph = TRUE)
plot(pca_table ,choice="ind",label=FALSE,
posleg="bottomright", main="Observations")
In my output graph data are visualized in black and I want to colour them according to data$gender . It is possible? how can I do?