plot PCA
Usage
plot_pca(
data,
config,
PC = c(1, 2),
add_txt = FALSE,
plotly = FALSE,
nudge = 0.1
)See also
Other plotting:
ContrastsPlotter,
INTERNAL_FUNCTIONS_BY_FAMILY,
UpSet_interaction_missing_stats(),
UpSet_missing_stats(),
medpolish_estimate_df(),
missigness_histogram(),
missingness_per_condition(),
missingness_per_condition_cumsum(),
plot_NA_heatmap(),
plot_estimate(),
plot_heatmap(),
plot_heatmap_cor(),
plot_heatmap_cor_iheatmap(),
plot_hierarchies_add_quantline(),
plot_hierarchies_boxplot_df(),
plot_hierarchies_line(),
plot_hierarchies_line_df(),
plot_intensity_distribution_violin(),
plot_raster(),
plot_sample_correlation(),
plot_screeplot()
Examples
istar <- sim_lfq_data_protein_config(with_missing = TRUE, weight_missing = .8, Nprot = 3000)
#> creating sampleName from fileName column
#> completing cases
#> completing cases done
#> setup done
config <- istar$config
analysis <- istar$data
tmp <- plot_pca(analysis, config, add_txt= TRUE, nudge = 0.01)
#> PCA: removed 2459 of 2986 features with missing values. For PCA with all features, impute first using LFQDataImp.
#> Joining with `by = join_by(sampleName)`
print(tmp)
stopifnot("ggplot" %in% class(tmp) )
tmp <- plot_pca(analysis, config, add_txt= FALSE)
#> PCA: removed 2459 of 2986 features with missing values. For PCA with all features, impute first using LFQDataImp.
#> Joining with `by = join_by(sampleName)`
stopifnot("ggplot" %in% class(tmp) )
tmp <- plot_pca(analysis, config, PC = c(1,2))
#> PCA: removed 2459 of 2986 features with missing values. For PCA with all features, impute first using LFQDataImp.
#> Joining with `by = join_by(sampleName)`
stopifnot("ggplot" %in% class(tmp) )
tmp <- plot_pca(analysis, config, PC = c(2,40))
#> PCA: removed 2459 of 2986 features with missing values. For PCA with all features, impute first using LFQDataImp.
#> Warning: nr of PCs: 13
print(tmp)
#> NULL