plot_pca_variance: Plot variance explained by PCA components

Description Usage Arguments Examples

View source: R/plots.R

Description

Plot the variance explained by each component. The number of components shown is controlled by 'num_components', with up to the first 10 componenets shown by default. If less than the requested number of components exist, then all the components will be shown.

Usage

1
plot_pca_variance(pca, num_components = 10)

Arguments

pca

output of pca_mip_data

num_components

numeric for number of maximum components to be shown

Examples

1
2
3
4
5
6
7
dat <- dummy_data()
dat <- filter_misc(dat = dat)
dat <- filter_coverage(dat = dat, min_coverage = 2)
dat <- melt_mip_data(dat = dat)
dat <- impute_mip_data(dat = dat)
pca <- pca_mip_data(dat = dat)
plot_pca_variance(pca, num_components = 3)

mrc-ide/mipmapper documentation built on May 20, 2019, 3:27 p.m.