Skip to contents

This function creates a plot of summary statistics using ggplot2.

Usage

stats_plot(data, population = NULL, statistics = NULL, type = "mean", ...)

Arguments

data

A data frame containing the data to be plotted.

population

The output of stats_summary(population = TRUE). Represents population parameters. Functions used to calculate statistics must be the same for a resonable output.

statistics

An optional vector of statistics to include in the plot.

type

The type of plot to create, either "mean" (default) or "box".

...

Additional arguments passed to ggplot2.

Value

A ggplot2 object representing the plot of summary statistics.