Learn R Programming

playwith (version 0.9-7)

marginals: Display marginal distributions

Description

Display marginal distributions of several variables, which may be numeric and/or categorical, on one plot.

Usage

marginals(data,
          reorder = TRUE,
          subset = TRUE,
          plot.points = FALSE,
          ref = TRUE,
          origin = 0,
          levels.fos = NULL,
          xlab = NULL, ylab = NULL,
          cex = 0.5,
          ...,
          as.table = TRUE,
          subscripts = TRUE)

Arguments

data
a data frame.
reorder
whether to reorder factor variables by frequency.
subset
data subset expression, evaluated with data.
plot.points, ref
passed to panel.densityplot.
origin, levels.fos
passed to panel.dotplot.
xlab, ylab, cex, as.table, subscripts
see xyplot.

Value

  • a trellis object.

Details

This implementation is currently a bit of a hack, in the case of mixed numeric and categorical variables.

See Also

panel.dotplot, panel.densityplot

Examples

Run this code
enviro <- transform(environmental, bad = ozone > 50)
marginals(enviro)

Run the code above in your browser using DataLab