plot.see_parameters_pca: Plot method for principal component analysis

View source: R/plot.parameters_pca.R

plot.see_parameters_pcaR Documentation

Plot method for principal component analysis

Description

The plot() method for the parameters::principal_components() function.

Usage

## S3 method for class 'see_parameters_pca'
plot(
  x,
  type = c("bar", "line"),
  size_text = 3.5,
  text_color = "black",
  size = 1,
  show_labels = TRUE,
  ...
)

Arguments

x

An object.

type

Character vector, indicating the type of plot. Options are three different shapes to represent component loadings; "bar" (default) for a horizontal bar chart, or "line" for a horizontal point and line chart.

size_text

Numeric value specifying size of text labels.

text_color

Character specifying color of text labels.

size

Depending on type, a numeric value specifying size of bars, lines, or segments.

show_labels

Logical. If TRUE, text labels are displayed.

...

Arguments passed to or from other methods.

Value

A ggplot2-object.

Examples

library(parameters)
data(mtcars)
result <- principal_components(mtcars[, 1:7], n = "all", threshold = 0.2)
result
plot(result)


see documentation built on Nov. 3, 2023, 5:10 p.m.