Learn R Programming

ggstatsplot (version 0.9.1)

extract_stats: Extracting dataframes with statistical details from {ggstatsplot}

Description

Extracting dataframes with statistical details from {ggstatsplot}

Usage

extract_stats(p, ...)

Arguments

p

A plot from {ggstatsplot} package

...

Ignored

Value

A list of tibbles containing statistical analysis summaries.

Details

This is a convenience function to extract dataframes with statistical details that are used to create expressions displayed in {ggstatsplot} plots as subtitle and/or as caption. Note that all of this analysis is carried out by the {statsExpressions} package.

For more details about underlying tests and effect size estimates, see the following vignette: https://indrajeetpatil.github.io/statsExpressions/articles/stats_details.html

Examples

Run this code
# NOT RUN {
if (require("PMCMRplus")) {
  set.seed(123)
  library(ggstatsplot)

  # in case of group comparisons
  p <- ggbetweenstats(mtcars, cyl, mpg)
  extract_stats(p)

  # the exact details depend on the function
  extract_stats(ggbarstats(mtcars, cyl, am))
}
# }

Run the code above in your browser using DataLab