Description Usage Arguments Value See Also Examples
Methdo to draw a plot for PCA contained in an ExposomePCA
1 2 3 4 5 6 7 8 9 |
object |
An onbject of class ExposomePCA |
set |
Group ( |
cmpX |
(default: |
cmpY |
(default: |
show.exposures |
(default: |
show.samples |
(default: |
phenotype |
If |
An object of class ggplot
or an object of class
gtable
if argument set
was set to "all"
.
pca to compite PCA on an ExposomeSet, plotPCA to plot the PCA, ExposomePCA as main class
1 2 3 4 5 6 7 8 9 10 11 | data("exposome")
epca <- pca(expo[3:7, 1:100])
# A grid with exposures space, samples space and explained variance
plotPCA(epca, set = "all")
# Only exposures space
plotPCA(epca, set = "exposures") + ggplot2::theme(legend.position = "bottom")
# Only samples space
plotPCA(epca, set = "samples")
# Only samples space but coloured by phenotype
plotPCA(epca, set = "samples", phenotype = "sex") +
ggplot2::theme(legend.position = "bottom")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.