plotPCAVar: Plot of explained variance against the principal components

View source: R/tab_dimensionreduction.R

plotPCAVarR Documentation

Plot of explained variance against the principal components

Description

The function plotPCAVar plots the explained variance (in y-axis against the principal components for the measured and permuted values.

Usage

plotPCAVar(var_x, var_perm = NULL)

Arguments

var_x

numeric (named numeric vector)

var_perm

matrix with the explained variance obtained by permutation (function permuteExplVar)

Details

The argument var_perm is optional and visualization of permuted values can be omitted by setting var_perm = NULL.

Value

gg object from ggplot

Author(s)

Thomas Naake

Examples

x <- matrix(seq_len(100), ncol = 10)
pca <- dimensionReduction(x = x, params = list(center = TRUE, scale = TRUE),
    type = "PCA")[[2]]
var_x <- explVar(d = pca, type = "PCA")
var_perm <- permuteExplVar(x = x, n = 100, center = TRUE, scale = TRUE)
plotPCAVar(var_x = var_x, var_perm = var_perm)


tnaake/MatrixQCvis documentation built on June 20, 2024, 7:22 a.m.