tests/testthat/helper-ggwithinstats.R

# shared fixtures for test-ggwithinstats.R

# build a plot of `score` by `condition` without statistical annotations, for
# checking which observations end up in the plotting data
build_within_plot <- function(data, ...) {
  ggplot2::ggplot_build(ggwithinstats(
    data = data,
    x = condition,
    y = score,
    type = "p",
    pairwise.display = "none",
    results.subtitle = FALSE,
    ...
  ))
}

Try the ggstatsplot package in your browser

Any scripts or data that you put into this service are public.

ggstatsplot documentation built on Oct. 18, 2026, 1:07 a.m.