pca_load_plot: Plot Loading Score from PCA

View source: R/pca.R

pca_load_plotR Documentation

Plot Loading Score from PCA

Description

Plot Loading Score from PCA

Usage

pca_load_plot(
  pca_recipe,
  num_comp = 1:4,
  num_top_vars = Inf,
  fill = c("#b6dfe2", "#0A537D"),
  nrow = NULL,
  ncol = NULL,
  ...
)

Arguments

pca_recipe

Object class recipe that already step_pca

num_comp

Integer vector indicate which PCs to show.

num_top_vars

Integer indicate number of top variables, ranking by absolute loading score, to show. Default Inf means all variables.

fill

(character) Fill of positive & negative values

nrow

(numeric) Number of rows in facet

ncol

(numeric) Number of columns in facet

...

passed to geom_col

Value

plot

Examples

library(magrittr)
library(lbmod)
iris %>%
  prep_pca() %>%
  pca_load_plot()

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