Learn R Programming

uwo4419 (version 0.3.0)

barplotStats: Barplot of Summary Statistics

Description

Produces a barplot of summary statistics.

Usage

barplotStats(x, y, data, stat="sum", includeN=FALSE, ...)

Arguments

x

Character string giving the name of the grouping variable.

y

Character string giving the name of the numeric variable to be summarized.

data

Data frame in which x and y can be found.

stat

A string given the statistic that will be used to summarize the data.

includeN

Logical indicating whether the number of observations in the group should be appended to the variable name for plotting purposes.

...

other arguments that will be passed down to stat.

Value

A plot

Examples

Run this code
# NOT RUN {
data(alberta)
barplotStats("k6group", "k3c", alberta, stat="mean")
# }

Run the code above in your browser using DataLab