ggplot.ictest: Scatterplot Matrix for a ictest Object using ggplot2

ggplot.ictestR Documentation

Scatterplot Matrix for a ictest Object using ggplot2

Description

For an object of class ictest, 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 'ictest'
ggplot(data, mapping = aes(), mapvar = NULL, which = "all", ..., 
       environment=parent.frame())

Arguments

data

object of class ictest

mapping

aesthetic mapping, see documentation for ggpairs. If x has the class mts then this argument is not used.

mapvar

data.frame of the external variables used by the aesthetic mappings. If x has the class mts then this argument is not used.

which

if "all", then all components of S in the ictest object are plotted. If "k", then only the first k components are plotted, where the value of k is taken from the ictest object. This is only meaningful if k was at least 2.

...

arguments passed on to ggpairs. If the component matrix has the class mts, xts or zoo then this argument is not used.

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

plot.ictest, pairs

Examples

# The data
X <- iris[, 1:4]

# The aesthetics variables
mapvar <- data.frame(iris[, 5])
colnames(mapvar) <- "species"

TestCov <- PCAasymp(X, k = 2)
ggplot(TestCov)
ggplot(TestCov, aes(color = species), mapvar = mapvar, which = "k")

ICtest documentation built on May 18, 2022, 9:05 a.m.