prism.plots: Plot prism-like Plots

Description Usage Arguments Details Author(s) See Also Examples

View source: R/prism.plots.R

Description

Plot prism-like Plots

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
prism.plots(
  formula,
  data,
  centerfunc = median,
  interquartile = TRUE,
  spreadfunc = function(x) {     return(1.96 * sd(x)/sqrt(length(x))) },
  def.axis = TRUE,
  jitter.y = FALSE,
  add = FALSE,
  start = 0,
  col = "gray",
  ...
)

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 median.

interquartile

Should the interquartile range be plotted? Defaults to TRUE.

spreadfunc

what function should be used to calculate the spread of the distribution? If interquartile=TRUE, this argument will be ignored. The default (when not ignored) is to produce a 95% confidence interval (1.96*sd(x)/sqrt(n)).

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)

col

What color should the dots be painted? Defaults to gray.

...

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.

Author(s)

Dustin Fife

See Also

boxplot, densityPlotR, plotSigBars

Examples

1
2
prism.plots(count ~ spray, data = InsectSprays, centerfunc=mean)
prism.plots(count ~ spray, data = InsectSprays, centerfunc=median)

dustinfife/fifer documentation built on Oct. 31, 2020, 3:36 p.m.