plot.err.time: Plot timeline data for multiple groups

Description Usage Arguments Examples

View source: R/plot.err.time.R

Description

Calculates the mean value for each group and time point. Adds error bars, showing +/- standard error (default) or standard deviation. Data is plotted with dots and lines.

Usage

1
2
3
4
5
6
## S3 method for class 'err.time'
plot(data, time, groups, col = "black",
  err.bars = "sterr", dodge = 0.02, cex = 2, xlab = "",
  ylab = "means", length = 0.02, lwd = 1, main = "", xaxt = T,
  las.x = 1, las.y = 2, legend.pos = "topleft", legend = TRUE,
  ylim = NULL, stats = FALSE)

Arguments

data

a numeric vector containing the data to plot.

time

a vector containing the time point information for data.

groups

vector containing the group information for data.

col

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

dodge

adds a dodge to the x-axis position of the groups.

cex

defines the size of the dots.

length

defines the length of the arrow heads of the error bars

xaxt

if TRUE (default) an x-axis is added to the plot.

legend.pos

defines the legend position. Must be "topleft", "topright", "bottomleft" or "bottomright". If legend != TRUE, no legend will be drawn.

stats

adds markers for significant differences (ANOVA, for the respective timepoint) to the bottom of the plot.

err

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

Examples

1
plot.err.time(data = c(1,2,4,5,4,3,2,3,3,4,6,5,4,3,2,3,4,5,2,3), time = c(rep(c(rep(1,5),rep(2,5)),2)), groups = c(rep("a",10),rep("b",10)), col=c("blue","red"))

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