meanPlot: Function to plot data and mean summary

Description Usage Arguments Details Value Author(s) Examples

View source: R/plot_functions.R

Description

This is a simple function designed to facilitate plotting raw data along with dots indicating the mean at each x-axis value.

Usage

1

Arguments

formula

A formula specifying the variable to be used on the y-axis and the variable to be used on the x-axis.

d

A data.frame class object containing the variables specified in the formula.

Details

Although this function can be used with any type of data that works with plot, it works best when the x axis values are discrete, so that there are several y-values at the same x-axis value so that the mean of multiple values is taken.

Value

Called for the side effect of creating a plot.

Author(s)

Wiley

Examples

1
2
# example usage of meanPlot
meanPlot(mpg ~ factor(cyl), d = mtcars)

ElkhartGroup/AdvancedRPkg documentation built on May 6, 2019, 3:24 p.m.