Learn R Programming

fifer (version 1.0)

prism.plots: Plot prism-like Plots

Description

Plot prism-like Plots

Usage

prism.plots(formula, data, centerfunc = mean, spreadfunc = function(x) { return(sd(x)/sqrt(length(x))) }, def.axis = TRUE, jitter.y = FALSE, add = FALSE, start = 0, ...)

Arguments

formula
a formula object with the quantitative variable as the response variable (e.g., Var~group).
data
a dataset containing the variables indicated in formula
centerfunc
what function should be used to indicate the center of the distribution. Defaults to mean.
spreadfunc
what function should be used to calculate the spread of the distribution. Defaults to sd. Currently, it must be a symmetrical function. Future implementations will have non-symmetric functions (e.g., interquartile range).
def.axis
Logical. Should the default axes be used?
jitter.y
Logical. Should the y values be jittered as well?
add
Should the plot be added to an existing plot?
start
What X value should the plot start at? (defaults to zero)
...
other arguments passed to plot

Details

Given a factor (e.g., group membership) and a quantitative variable, this function plots a psuedo-scatterplot of the groups on the x axis (jittered) and the DV on the y axis.

See Also

boxplot, densityPlotR, plotSigBars

Examples

Run this code
prism.plots(count ~ spray, data = InsectSprays, centerfunc=mean)
prism.plots(count ~ spray, data = InsectSprays, centerfunc=median)

Run the code above in your browser using DataLab