plotScreePCA: Plot the PCA scree plot.

View source: R/pcaOtherPlotting.R

plotScreePCAR Documentation

Plot the PCA scree plot.

Description

Plot the PCA scree plot.

Usage

plotScreePCA(
  spe_object,
  dims = ncol(spe_object),
  precomputed = NULL,
  assay = 1,
  bar_color = "black",
  bar_fill = "royalblue",
  bar_width = 0.8,
  point_col = "tomato3",
  line_col = "tomato3",
  point_size = 2
)

Arguments

spe_object

A SpatialExperiment object.

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).

bar_color

Color for bar.

bar_fill

Fill for bar.

bar_width

Bar width.

point_col

Color for point.

line_col

Color for line.

point_size

Point size.

Value

A ggplot object.

Examples

data("dkd_spe_subset")
plotScreePCA(dkd_spe_subset, dims = 10)

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