nicolas-robette / GDAtools

R package for geometric data analysis and more
https://nicolas-robette.github.io/GDAtools/
10 stars 4 forks source link

How can I get supplymentary variables's coord for multiple sup valriables #12

Closed 419kfj closed 1 year ago

419kfj commented 1 year ago

robette,

When I get the information of supplementary variable on GDA, I use 'supvar' and 'ggadd_supvar'. But these functions handle only one sup variable.

I want to get the information on multiple sup variables. How can I do it. (When I use FactoMiner::MCA, it had option names 'quali.sup'. https://rdrr.io/cran/FactoMineR/man/MCA.html)

regards kazuo

419kfj commented 1 year ago

self answer.

I find your explanation on "Geometric Data Analysis with GDAtools" , https://github.com/cran/GDAtools/blob/master/vignettes/english/Tutorial_GDA.Rmd.

ggcloud_variables(mca, shapes=FALSE, col="lightgray") %>% 
   ggadd_supvar(mca, Taste$Age, col="dodgerblue3", shape=1,segment = TRUE,,shapesize = 3) %>% 
   ggadd_supvar(mca, Taste$Educ, col="tomato", shape=2,segment = TRUE,,shapesize = 3) %>% 
   ggadd_supvar(mca, Taste$Gender, col="seagreen", shape=3,segment = TRUE,shapesize = 3) -> p
p 

If there is a way to use repl function, I hope you will teach me.

regrads

kazuo

nicolas-robette commented 1 year ago

I've just added two new functions, varsups and ggadd_supvars (with an "s"), which deal with multiple supplementary variables. I hope it will do the job !

Bests, Nicolas

419kfj commented 1 year ago

Nicolas,

Thank you for your support.

I have tried to use varsups and ggadd_varsups.

Chrismas version ;-)

It works !

kazuo