Hello I have a multivariate dataset
I performed a PCA over my scaled data and used fviz_pca_biplot()
function for displaying a biplot.
this is a example of what I did:
(example with mtcars)
colnames(mtcars)
"mpg" "cyl" "disp" "hp" "drat" "wt" "qsec" "vs" "am" "gear" "carb"
ds <- mtcars %>%
scale()
PCA_analysis <- princomp(ds)
fviz_pca_biplot(PCA_analysis, label = "all", habillage = mtcars$gear)
The issue is that I want to display the labeling not only by "gear" variable but by "am" variable of mtcars dataset, in a way that the point colors are relative to "gear" variable and the shape of the points are relative of the "am" variable