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.

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

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)