ggplot.ladle {ICtest} | R Documentation |
Scatterplot Matrix for a ladle Object using ggplot2
Description
For an object of class ladle, plots either the pairwise scatter plot matrix using ggpairs
from GGally, or the time series plots of the underlying components using ggplot2. The user can choose if only the components considered interesting or all of them should be plotted. Aesthetics can be passed to ggpairs as well.
Usage
## S3 method for class 'ladle'
ggplot(data, mapping = aes(), mapvar = NULL, which = "all", ...,
environment=parent.frame())
Arguments
data |
object of class ladle |
mapping |
aesthetic mapping, see documentation for |
mapvar |
data.frame of the external variables used by the aesthetic mappings. If |
which |
if |
... |
arguments passed on to |
environment |
not used but needed for consistency. |
Details
If the component matrix has the class mts
, xts
or zoo
then a time series plot will be plotted using ggplot2. Otherwise, a pairwise scatter plot matrix will be plotted using GGally.
Author(s)
Klaus Nordhausen, Joni Virta
See Also
Examples
# The data
X <- as.matrix(iris[, 1:4])
# The aesthetics variables
mapvar <- data.frame(iris[, 5])
colnames(mapvar) <- "species"
ladle_res <- PCAladle(X)
# The estimate
summary(ladle_res)
# Plots of the components
ggplot(ladle_res)
ggplot(ladle_res, aes(color = species), mapvar = mapvar, which = "k")