plot_pca_loadings: PCA loadings plot

View source: R/scatter.R

plot_pca_loadingsR Documentation

PCA loadings plot

Description

Computes PCA using one of the methods provided in the Bioconductor package pcaMethods and plots the loadings of first principal components CITATION: When using this function, cite the pcaMethods package

Usage

plot_pca_loadings(
  object,
  pcs = c(1, 2),
  all_features = FALSE,
  center = TRUE,
  scale = "uv",
  n_features = c(10, 10),
  title = "PCA loadings",
  subtitle = NULL,
  text_base_size = 14,
  point_size = 2,
  label_text_size = 4,
  ...
)

Arguments

object

a MetaboSet object

pcs

numeric vector of length 2, the principal components to plot

all_features

logical, should all features be used? If FALSE (the default), flagged features are removed before visualization.

center

logical, should the data be centered prior to PCA? (usually yes)

scale

scaling used, as in pcaMethods::prep. Default is "uv" for unit variance

n_features

numeric vector of length two, number of top feature to plot for each principal component

title, subtitle

the titles of the plot

text_base_size

numeric, base size for text

point_size

numeric, size of the points

label_text_size

numeric, size of the labels

...

additional arguments passed to pcaMethods::pca

Value

a ggplot object.

See Also

pca

Examples

plot_pca_loadings(merged_sample, n_features = c(2, 4))


antonvsdata/notame documentation built on Sept. 14, 2024, 11:09 p.m.