dispersion: A smart alternative to 'stripchart'.

Description Usage Arguments Value Author(s) References See Also Examples

Description

Plots a "dispersion graph", a variation of stripchart, with the stacked points distributed either side of the line.

Usage

1
dispersion(x, grps, data = parent.frame(), method = "dispersion", jitter = 0.1, offset = 1/3, vertical = TRUE, group.names, add = FALSE, at = NULL, datlim = NULL, grplim = NULL, main = NULL, datlab = NULL, grplab = NULL, log = FALSE, pch = 18, col = par("fg"), cex = 1, line=TRUE, ...)

Arguments

x

a formula, list of grouped data, or a vector of values.

grps

if 'x' is a vector, an optional factor determining how the data should be grouped.

data

if 'x' is a formula, a data frame containing the variables.

method

one of "dispersion", "stacked", "jitter", or "overplot" (or abbreviations); see codestripchart for details.

jitter, offset

control jittering and stacking; see codestripchart.

vertical

if TRUE, data are on the vertical axis, otherwise horizontal.

group.names

an optional vector of names for the groups.

add

if TRUE, results will be added to an existing plot.

at

specifies the positions to plot groups; only meaningful when adding to an existing plot.

datlim

limits for the data axis; if vertical=TRUE, this will be the vertical axis.

grplim

limits for the groups axis.

main, datlab, grplab

plot title and names for the data and group axes.

log

if TRUE, the data will be plotted on a log scale (if you do this, points may overlap, so an open plotting character is recommended).

pch, col, cex

the plotting character type, colour and size.

line

logical; if TRUE, a grey line is drawn through the points.

...

additional plotting parameters.

Value

Returns (invisibly) a list with the values for the groups plotted.

Author(s)

Mike Meredith, 3 Dec 2006, based on stripchart in package stats.

References

Magnusson, W E; G Mourano. 2004. Statistics without math. Sinauer, Sunderland MA. pp28-30

See Also

stripchart.

Examples

1
2
3
dispersion(decrease ~ treatment,
    main = "dispersion(OrchardSprays)", 
    vertical = FALSE, log = TRUE, data = OrchardSprays)

mikemeredith/MMmisc documentation built on Nov. 8, 2019, 11:34 p.m.