Learn R Programming

karyotapR (version 1.0.1)

PCAKneePlot: Plot of PCA proportion of variance explained

Description

Draws "knee plot" of PCA proportion of variance explained to determine which principal components (PCs) to include for downstream applications e.g. clustering. Variance explained for each PC is indicated by the line. Cumulative variance explained is indicated by the bars.

Usage

PCAKneePlot(TapestriExperiment, alt.exp = "alleleFrequency", n.pcs = 10)

Value

ggplot2 object, combined line plot and bar graph

Arguments

TapestriExperiment

TapestriExperiment object

alt.exp

Character, altExp to use, NULL uses top-level/main experiment. Default "alleleFrequency".

n.pcs

Numeric, number of PCs to plot, starting at 1. Default 10.

Examples

Run this code
tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
tap.object <- runPCA(tap.object, alt.exp = "alleleFrequency")
PCAKneePlot(tap.object, n.pcs = 5)

Run the code above in your browser using DataLab