plotPCAVar {MatrixQCvis}R Documentation

Plot of explained variance against the principal components

Description

The function 'plotPCAVar' plots the explained variance (in 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(1:100, ncol = 10)
var_x <- explVar(x = x, params = list(center = TRUE, scale = TRUE),
    type = "PCA")
var_perm <- permuteExplVar(x = x, n = 100, center = TRUE, scale = TRUE)
plotPCAVar(var_x = var_x, var_perm = var_perm)


[Package MatrixQCvis version 1.0.0 Index]