plot_PCA_select | R Documentation |
plot_PCA
is a replacement for plot.PCA. plot_PCA_select
handles the selection part for plot_PCA
: determines for which of the active elements the labels (names) will be printed. Restricting the number of these elements can be useful if the plot contains a lot of elements.
plot_PCA_select(res, var_ind = "ind", select = NULL, axes = 1:2)
res |
Structure that is the output of the function PCA |
var_ind |
Character string that indicates if variables ( |
select |
Character string with a selection criterion (see |
axes |
Numeric vector with two integers indicating the dimensions that will be plotted. Default: |
The select mechanism is taken over asis from the PCA function. The labels of selected elements will be plotted.
The authors Francois Husson husson@agrocampus-ouest.fr and Jeremy Mazet describe it as follows:
The select argument can be used in order to select a part of the elements (individuals if you draw the graph of individuals, or variables if you draw the graph of variables) that are drawn. For example, you can use:
select = 1:5
and then the elements 1:5
are drawn.
select = c("name1","name5")
and then the elements that have the names name1
and name5
are drawn.
select = "coord 10"
and then the 10 elements that have the highest (squared) coordinates on the 2 chosen dimensions are drawn.
select = "contrib 10"
and then the 10 elements that have the highest contribution on the 2 dimensions of your plot are drawn.
select = "cos2 5"
and then the 5 elements that have the highest cos2 on the 2 dimensions of your plot are drawn.
select = "dist 8"
and then the 8 elements that have the highest distance to the center of gravity are drawn.
NB. the following functionality is contained in plot.PCA but not described there:
select = "cos2 0.8"
and then the elements for which the sum of the cos2 on the 2 dimensions of your plot is greater than 0.8 are drawn.
All ideas come from the creators of the FactoMineR package. This implementation is mine and if you find any errors, these will be mine.
## Not run:
plot_PCA_select(res,var_ind = 'ind',sel='contrib 6', axes = 1:2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.