plotEigenvalues.pca: Eigenvalues plot for PCA model

View source: R/pca.R

plotEigenvalues.pcaR Documentation

Eigenvalues plot for PCA model

Description

Shows a plot with eigenvalues vs. number of components, optionally with log or sqrt transformation applied.

Usage

## S3 method for class 'pca'
plotEigenvalues(
  obj,
  type = "b",
  labels = "values",
  transform = "none",
  xticks = seq_len(obj$ncomp),
  ylab = NULL,
  ...
)

Arguments

obj

a PCA model (object of class pca)

type

type of the plot ("l", "b", "h")

labels

what to show as labels for plot objects.

transform

transformation to apply to eigenvalues: "none", "log", or "sqrt"

xticks

vector with ticks for x-axis

ylab

label for y-axis

...

other plot parameters (see mdaplot for details)

Details

The eigenvalues represent the variance captured by each principal component. Transformations can be useful for identifying the number of significant components: "log" applies log(eigenvalues) and "sqrt" applies sqrt(eigenvalues).


mdatools documentation built on March 6, 2026, 5:08 p.m.