Skip to contents

Create combined scree plot showing individual and cumulative variance

Usage

plot_variance_explained(variance_tbl, threshold = 0.8)

Arguments

variance_tbl

Variance tibble from tidy_pca

threshold

Horizontal line for variance threshold (default: 0.8 for 80%)

Value

A ggplot object.

Examples

# \donttest{
model <- tl_model(iris[, 1:4], method = "pca")
plot_variance_explained(model$fit$variance_explained)

# }