pca_loadings_plot: PCA loadings plot

View source: R/PCA_plotfcns.R

pca_loadings_plotR Documentation

PCA loadings plot

Description

A barchart (one component) or scatter plot (two components) of the selected principal component loadings.

Usage

pca_loadings_plot(
  components = c(1, 2),
  style = "points",
  label_features = NULL,
  ...
)

Arguments

components

(numeric) The principal components used to generate the plot. The default is c(1, 2).

style

(character) Plot style. Allowed values are limited to the following:

  • "points": Loadings and scores are plotted as a scatter plot.

  • "arrows": The loadings are plotted as arrow vectors.

The default is "points".

label_features

(character, NULL) Feature labels. Allowed values are limited to the following:

  • "character()": A vector of labels for the features.

  • "NULL": No labels.

  • "row.names": Labels will be extracted from the column names of the data matrix.

The default is NULL.

...

Additional slots and values passed to struct_class.

Value

A pca_loadings_plot object. This object has no output slots. See chart_plot in the struct package to plot this chart object.

Inheritance

A pca_loadings_plot object inherits the following struct classes:

⁠[pca_loadings_plot]⁠ >> ⁠[chart]⁠ >> ⁠[struct_class]⁠

Examples

M = pca_loadings_plot(
      components = c(1, 2),
      style = "points",
      label_features = NULL)

C = pca_loadings_plot()

computational-metabolomics/structtoolbox documentation built on July 2, 2024, 10:46 p.m.