Learn R Programming

robCompositions (version 2.6.0)

plot.cellPcaCoDa: Plot method for cellwise-robust compositional PCA

Description

Provides diagnostic plots for a cellPcaCoDa object. which = 1 (default) draws a contamination heatmap of the raw-part flags. which = 2 draws a compositional biplot in clr space.

Usage

# S3 method for cellPcaCoDa
plot(x, y, ..., which = 1)

Value

Called for its side effect (a plot). Returns NULL

invisibly.

Arguments

x

object of class "cellPcaCoDa" as returned by cellPcaCoDa

y

not used

...

further arguments passed to image (for which = 1) or biplot (for which = 2)

which

integer; 1 for contamination heatmap (default), 2 for compositional biplot

Author

Matthias Templ

See Also

cellPcaCoDa, print.cellPcaCoDa, summary.cellPcaCoDa

Examples

Run this code
data(arcticLake)
set.seed(123)
x <- arcticLake
x[1, 2] <- x[1, 2] * 10
x <- constSum(x)
res <- cellPcaCoDa(x, k = 2)

## contamination heatmap
plot(res)

## biplot
plot(res, which = 2)

Run the code above in your browser using DataLab