Learn R Programming

ggplot2 (version 3.5.0)

mean_se: Calculate mean and standard error of the mean

Description

For use with stat_summary()

Usage

mean_se(x, mult = 1)

Value

A data frame with three columns:

y

The mean.

ymin

The mean minus the multiples of the standard error.

ymax

The mean plus the multiples of the standard error.

Arguments

x

numeric vector.

mult

number of multiples of standard error.

Examples

Run this code
set.seed(1)
x <- rnorm(100)
mean_se(x)

Run the code above in your browser using DataLab