Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

behaviour of the invisible option in fviz_pca() #26

Closed
ginolhac opened this issue Feb 6, 2017 · 2 comments
Closed

behaviour of the invisible option in fviz_pca() #26

ginolhac opened this issue Feb 6, 2017 · 2 comments

Comments

@ginolhac
Copy link

ginolhac commented Feb 6, 2017

Hello,

thanks for a very nice package, a great add-on to FactomineR.

In my own data, I have quite a lot of variables and I'd like to make a PCA-biplot where I summarized some variables. It works well, for the plotting, the ideal would be to have:

  • points for individuals
  • arrows for the quanti.sup only.

so I used the invisible option and it doesn't work as I expect.

see a reprex below

theme_set(theme_bw())
pca_deca <- PCA(decathlon2, scale.unit = TRUE, graph = FALSE, quanti.sup = 12, quali.sup = c(11, 13))
fviz_pca_biplot(pca_deca, invisible = "quanti.sup")
fviz_pca_biplot(pca_deca)

both give the same plots, while I would expect invisible = "quanti.sup" to remove Points
image

then

fviz_pca_biplot(pca_deca, invisible = "var")

image

I see only the quanti.sup. Shouldn't we keep the individuals and Points?
Am I misinterpreting how invisible works?

Session info -------------------
 setting  value                       
 version  R version 3.3.2 (2016-10-31)
 system   x86_64, darwin15.6.0        
 ui       RStudio (1.0.136)           
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       Europe/Madrid               
 date     2017-02-06  
Packages ---------------------
 factoextra    * 1.0.4      2017-01-09 CRAN (R 3.3.2)                  
 FactoMineR    * 1.34       2016-11-17 CRAN (R 3.3.2)
kassambara added a commit that referenced this issue Feb 6, 2017
kassambara added a commit that referenced this issue Feb 6, 2017
@kassambara
Copy link
Owner

Thank you for reporting this bug!

Should work now!

Best,
/Alboukadel

@ginolhac
Copy link
Author

ginolhac commented Feb 7, 2017

awesome!! thanks a lot, works like a charm. Thanks again for such a quick fix.
I have some other requests, but need to figure out if it is a feature request or a bug ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants