Hi everyone,
I used the factoextra package to make the biplot with top=20 contributed vars. The code is:
fviz_pca_biplot(pca_result1, title = "", col.var = "steelblue", select.var = list(contrib = 20))
The result is very nice for me. However, I have a problem that I need the name of those 20 vars in a list format that I can use later. Do you know any way to do that, except writing down the name of top=20 vars from the biplot graph?
Thank you,
Perhaps save the plot object and then run
str()
to see if these top 20 are stored in any specific part of the plot object:...or, just check the code of the fviz_pca_biplot function to see how it defines these top 20, and then run the code yourself.
Thank you so much for your help. I will try the fviz_pca_biplot function to see how I can do the calculation. Thanks.
Hello, guillermo.luque.ds
If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one answer, if they all work.
Thanks, I did upvote and accept the answer.