plot.err: Plot means and error bars

Description Usage Arguments Examples

View source: R/plot.err.R

Description

Plot the mean of a data vector, grouped be the group vector and add error bars.

Usage

1
2
3
4
5
6
## S3 method for class 'err'
plot(data, groups, at = FALSE, type = "dot", barwidth = 0.2,
  col = "black", err.bars = "sterr", cex = 2, xlab = "",
  ylab = "means", length = 0.1, lwd = 1, main = "", las.x = 1,
  las.y = 2, xaxt = T, cex.yaxis = 1, cex.xaxis = 1, yscale = c(1, 1),
  stats = T, stats.mark = T, sig.groups = F)

Arguments

data

a numeric vector containing the data to plot.

groups

vector containing the group information for data.

at

optinal vector to arrange the position of the data points on the x-axis.

type

type of plot: Either "dot" for dots, "bar" for bars or "diffbar" for bars, starting at the average.

barwidth

if type="bar", barwidth defines the width of the bars.

col

vector defining the color for each group. Must have the same length as number of groups.

err.bars

error bars show standard error ("sterr") or standard deviation ("sd").

cex

defines the size of the dots.

xlab

label for x-axis.

ylab

label for y-axis.

length

defines the length of the arrow heads of the error bars

lwd

line width of the error bars.

main

title of the plot

las.x

text orientation of the x-axis labels.

las.y

text orientation of the y-axis labels.

xaxt

add x-axis if TRUE

cex.yaxis

scaling for y-axis labels

cex.xaxis

scaling for x-axis labels

yscale

vector of length two to scale the ylim's upper and lower limit

stats

add ANOVA results to the plot

stats.mark

add stars to significant ANOVA results

sig.groups

vector with significant marker, which will be places over the error bars (order is 1:n and not according to at!)

Examples

1
2
plot.err(hr.data$weight, hr.data$group)
plot.err(hr.data$weight, paste(hr.data$group, hr.data$rank))

gtimmerhaus/aquaR documentation built on May 17, 2019, 8:57 a.m.