geom_arrow_pca | R Documentation |
Arrow for PCA bi-plot
geom_arrow_pca(
pca_recipe,
x = PC1,
y = PC2,
x_origin = 0,
y_origin = 0,
length = ggplot2::unit(0.05, "inches"),
type = "closed",
color = "black",
...
)
pca_recipe |
Object class recipe that already |
x |
unquoted name to specify which principle component to plot in x-axis (must be one of PC1, PC2, PC3, ... ,etc.) |
y |
unquoted name to specify which principle component to plot in y-axis (must be one of PC1, PC2, PC3, ... ,etc.) |
x_origin |
(numeric) x-origin of the arrow |
y_origin |
(numeric) y-origin of the arrow |
length |
length of the arrow defined by function |
type |
type of the arrow head (passed to |
color |
color of the arrow segment (passed to |
... |
passed to |
plot arrow
library(magrittr)
library(lbmod)
prep_pca(iris) %>%
pca_scatter_plot(ggplot2::aes(color = Species)) +
geom_arrow_pca(prep_pca(iris))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.