pcaEnrichment {escape} | R Documentation |
Density plot of the principal components
pcaEnrichment( PCAout, PCx, PCy, colors = c("#0348A6", "#7AC5FF", "#C6FDEC", "#FFB433", "#FF4B20"), contours = TRUE, facet = NULL )
PCAout |
The output of |
PCx |
The principal component graphed on the x-axis |
PCy |
The principal component graphed on the y-axis |
colors |
The color palette for the density plot |
contours |
Binary classifier to add contours to the density plot |
facet |
A parameter to separate the graph |
ggplot2 object of the results of PCA for the enrichment scores
performPCA
for generating PCA results.
ES2 <- readRDS(url( "https://ncborcherding.github.io/vignettes/escape_enrichment_results.rds")) PCA <- performPCA(enriched = ES2, groups = c("Type", "Cluster")) pcaEnrichment(PCA, PCx = "PC1", PCy = "PC2", contours = TRUE)