averageLineWithErrorBars: Add error bars to an existing plot

View source: R/mathTools.R

averageLineWithErrorBarsR Documentation

Add error bars to an existing plot

Description

Add an average line and standard error bars to an existing plot

Usage

averageLineWithErrorBars(x, y, average.FUN = mean, col = 1, error.col = 1, error.lty = 1, whisker = 0.2, ...)

Arguments

x

vector of X axis locations

y

vecotr of Y axis values, to be averaged at each value of X

average.FUN

The function for calculating the average

col

Color for the average line

error.col

Color for the error bars

error.lty

Line type for the error bars

whisker

Size of the whiskers, in units of X

...

Additional arguments, passed to line

Details

A rather hokey attempt to be able to superimpose error bars on a variety of plots.


robertdouglasmorrison/DuffyTools documentation built on April 16, 2024, 6:31 a.m.