Learn R Programming

pubh (version 3.0.0)

strip_error: Strip plots with error bars.

Description

strip_error constructs strip plots with error bars showing 95 confidence intervals around mean values.

Usage

strip_error(data, x, y, size = 0.5)

Arguments

data

A data frame.

x

A categorical variable (the exposure).

y

A numerical variable (the outcome or response variable).

size

Size of the marker.

Examples

Run this code
data(energy, package = "ISwR")
require(sjlabelled, quietly = TRUE)
energy <- energy |>
  var_labels(
    expend = "Energy expenditure (MJ/day)",
    stature = "Stature"
  )

energy |>
  strip_error(x = stature, y = expend)

Run the code above in your browser using DataLab