plotPCAbiplot: Plot PCA bi plot

View source: R/pcaOtherPlotting.R

plotPCAbiplotR Documentation

Plot PCA bi plot

Description

Plot PCA bi plot

Usage

plotPCAbiplot(
  spe_object,
  n_loadings = 10,
  dims = c(1, 2),
  precomputed = NULL,
  assay = 1,
  arrow_x = 0,
  arrow_y = 0,
  ...
)

Arguments

spe_object

A SpatialExperiment object.

n_loadings

Plot the top n gene loadings

dims

The top n dimensions to be plotted

precomputed

a dimensional reduction results from stats::prcomp. result in reducedDims(object) to plot. Default is NULL, we will compute for you.

assay

a numeric or character, specifying the assay to use (for SummarizedExperiment and its derivative classes).

arrow_x

a numeric, indicating the x coordinate of the base of the arrow.

arrow_y

a numeric, indicating the y coordinate of the base of the arrow.

...

aesthetic mappings to pass to ggplot2::aes().

Value

A ggplot object.

Examples

data("dkd_spe_subset")
plotPCAbiplot(dkd_spe_subset)

DavisLaboratory/standR documentation built on Sept. 8, 2024, 9:57 p.m.