caret (version 5.05.004)

featurePlot: Wrapper for Lattice Plotting of Predictor Variables

Description

A shortcut to produce lattice graphs

Usage

featurePlot(x, y, 
            plot = if(is.factor(y)) "strip" else "scatter",
            labels = c("Feature", ""), 
            ...)

Arguments

Value

  • An object of class ``trellis''. The `update' method can be used to update components of the object and the `print' method (usually called by default) will plot it on an appropriate plotting device.

Details

This function ``stacks'' data to get it into a form compatible with lattice and creates the plots

Examples

Run this code
x <- matrix(rnorm(50*5),ncol=5)
y <- factor(rep(c("A", "B"),  25))

trellis.par.set(theme = col.whitebg(), warn = FALSE)
featurePlot(x, y, "ellipse")
featurePlot(x, y, "strip", jitter = TRUE)
featurePlot(x, y, "box")
featurePlot(x, y, "pairs")

Run the code above in your browser using DataCamp Workspace