pca_scatter_plot: PCA Scatter Plot

View source: R/pca.R

pca_scatter_plotR Documentation

PCA Scatter Plot

Description

PCA Scatter Plot

Usage

pca_scatter_plot(
  pca_recipe,
  mapping = NULL,
  x = PC1,
  y = PC2,
  geom_type = geom_point,
  alpha = 0.8,
  size = 2,
  ...
)

Arguments

pca_recipe

object class recipe that already step_pca

mapping

aesthetic i.e. ggplot2::aes() mapping

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.)

geom_type

unquoted name to specify type of geom to plot: geom_point or geom_text

alpha

passed to geom_point

size

passed to geom_point

...

passed to geom_point

Value

plot

Examples

library(magrittr)
library(lbmod)
iris %>%
  prep_pca() %>%
  pca_scatter_plot(ggplot2::aes(color = Species))

Lightbridge-KS/lbmod documentation built on Jan. 28, 2024, 6:21 p.m.