| ggpca_cor_circle | R Documentation |
The active variables of a principal component analysis as arrows in the circle of
correlations: the coordinate of a variable on an axis is its correlation with it. Hovering a
variable shows its coordinates, and its projections on the two axes. ggfacto draws
it for a principal component analysis with 'profiles = FALSE' and nothing else asked for; by
default, it draws the same arrows over the cloud of individuals.
ggpca_cor_circle(
res.pca,
axes = c(1, 2),
proj = FALSE,
interactive = FALSE,
text_size = 3.5,
lang = NULL,
axes_names = NULL,
axes_reverse = NULL,
title,
xlim,
ylim
)
res.pca |
An analysis made with |
axes |
The axes to print, as a numeric vector of length 2. |
proj |
Set to 'TRUE' to print projections of vectors over the two axes. |
interactive |
Set to 'TRUE' to get the interactive graph at once, as |
text_size |
Size of the text. |
lang |
|
axes_names |
Names of all the axes, as a character vector. |
axes_reverse |
'1' to invert left and right, '2' to invert up and down, '1:2' for both. |
title |
The title of the graph. |
xlim, ylim |
Horizontal and vertical limits, as numeric vectors of length 2. |
A ggplot, or an html widget with 'interactive = TRUE'.
data(mtcars, package = "datasets")
mtcars <- mtcars[1:7] |> dplyr::rename(weight = wt)
res.pca <- principal_component_analysis(mtcars, 1:7)
ggpca_cor_circle(res.pca)
ggpca_cor_circle(res.pca) |> ggi() # interactive
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.