plotPCAVariance: plotPCAVariance

Description Usage Arguments Value Examples

View source: R/ascend_plots.R

Description

Generates a scree plot of PCs generated by runPCA. The principal components (PCs) are sorted from largest percent variance to the smallest percent variance. This plot is for determining the optimal number of PCs to retain for further analysis.

Usage

1
plotPCAVariance(object, n = 50)

Arguments

object

An EMSet that has undergone PCA.

n

Number of PCs to view on the plot.

Value

A ggplot2 glob that contains a scatter qplot.

Examples

1
2
3
4
5
# Load EMSet
em_set <- ascend::analyzed_set

# Plot PCA variance
pca_variance_plot <- plotPCAVariance(em_set, n = 10)

IMB-Computational-Genomics-Lab/ascend documentation built on Aug. 29, 2019, 4:10 a.m.