pcascree: Scree plot of the PCA on the samples

Description Usage Arguments Value Examples

View source: R/pcaplot.R

Description

Produces a scree plot for investigating the proportion of explained variance, or alternatively the cumulative value

Usage

1
pcascree(obj, type = c("pev", "cev"), pc_nr = NULL, title = NULL)

Arguments

obj

A prcomp object

type

Display absolute proportions or cumulative proportion. Possible values: "pev" or "cev"

pc_nr

How many principal components to display max

title

Title of the plot

Value

An object created by ggplot, which can be assigned and further customized.

Examples

1
2
3
4
5
dds <- makeExampleDESeqDataSet_multifac(betaSD_condition = 3, betaSD_tissue = 1)
rlt <- DESeq2::rlogTransformation(dds)
pcaobj <- prcomp(t(SummarizedExperiment::assay(rlt)))
pcascree(pcaobj, type = "pev")
pcascree(pcaobj, type = "cev", title = "Cumulative explained proportion of variance - Test dataset")

pcaExplorer documentation built on Nov. 8, 2020, 5:29 p.m.