Learn R Programming

⚠️There's a newer version (0.13.0) of this package.Take me there.

{ggstatsplot}: {ggplot2} Based Plots with Statistical Details

StatusUsageMiscellaneous

Raison d’être

“What is to be sought in designs for the display of information is the clear portrayal of complexity. Not the complication of the simple; rather … the revelation of the complex.” - Edward R. Tufte

{ggstatsplot} is an extension of {ggplot2} package for creating graphics with details from statistical tests included in the information-rich plots themselves. In a typical exploratory data analysis workflow, data visualization and statistical modeling are two different phases: visualization informs modeling, and modeling in its turn can suggest a different visualization method, and so on and so forth. The central idea of {ggstatsplot} is simple: combine these two phases into one in the form of graphics with statistical details, which makes data exploration simpler and faster.

Installation

TypeSourceCommand
Releaseinstall.packages("ggstatsplot")
Developmentremotes::install_github("IndrajeetPatil/ggstatsplot")

Citation

If you want to cite this package in a scientific journal or in any other context, run the following code in your R console:

citation("ggstatsplot")

To cite package 'ggstatsplot' in publications use:

  Patil, I. (2021). Visualizations with statistical details: The
  'ggstatsplot' approach. Journal of Open Source Software, 6(61), 3167,
  doi:10.21105/joss.03167

A BibTeX entry for LaTeX users is

  @Article{,
    doi = {10.21105/joss.03167},
    url = {https://doi.org/10.21105/joss.03167},
    year = {2021},
    publisher = {{The Open Journal}},
    volume = {6},
    number = {61},
    pages = {3167},
    author = {Indrajeet Patil},
    title = {{Visualizations with statistical details: The {'ggstatsplot'} approach}},
    journal = {{Journal of Open Source Software}},
  }

Acknowledgments

I would like to thank all the contributors to {ggstatsplot} who pointed out bugs or requested features I hadn’t considered. I would especially like to thank other package developers (especially Daniel Lüdecke, Dominique Makowski, Mattan S. Ben-Shachar, Brenton Wiernik, Patrick Mair, Salvatore Mangiafico, etc.) who have patiently and diligently answered my relentless questions and supported feature requests in their projects. I also want to thank Chuck Powell for his initial contributions to the package.

The hexsticker was generously designed by Sarah Otterstetter (Max Planck Institute for Human Development, Berlin). This package has also benefited from the larger #rstats community on Twitter, LinkedIn, and StackOverflow.

Thanks are also due to my postdoc advisers (Mina Cikara and Fiery Cushman at Harvard University; Iyad Rahwan at Max Planck Institute for Human Development) who patiently supported me spending hundreds (?) of hours working on this package rather than what I was paid to do.

Copy Link

Version

Install

install.packages('ggstatsplot')

Monthly Downloads

9,447

Version

0.9.4

License

GPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Indrajeet Patil

Last Published

December 4th, 2024

Functions in ggstatsplot (0.9.4)

bugs_long

Tidy version of the "Bugs" dataset.
Titanic_full

Titanic dataset.
bugs_wide

Wide-format version of the "Bugs" dataset.
grouped_ggdotplotstats

Grouped histograms for distribution of a labeled numeric variable
grouped_ggcorrmat

Visualization of a correlalogram (or correlation matrix) for all levels of a grouping variable
ggdotplotstats

Dot plot/chart for labeled numeric data.
gghistostats

Histogram for distribution of a numeric variable
ggpiestats

Pie charts with statistical tests
grouped_gghistostats

Grouped histograms for distribution of a numeric variable
grouped_ggpiestats

Grouped pie charts with statistical tests
theme_ggstatsplot

Default theme used in {ggstatsplot}
combine_plots

Combining and arranging multiple plots in a grid
.grouped_list

Split data frame into a list by grouping variable.
reexports

Objects exported from other packages
ggstatsplot-package

ggstatsplot: 'ggplot2' Based Plots with Statistical Details
ggwithinstats

Box/Violin plots for repeated measures comparisons
ggcoefstats

Dot-and-whisker plots for regression analyses
grouped_ggwithinstats

Violin plots for group or condition comparisons in within-subjects designs repeated across all levels of a grouping variable.
grouped_ggscatterstats

Scatterplot with marginal distributions for all levels of a grouping variable
ggscatterstats

Scatterplot with marginal distributions and statistical results
extract_stats

Extracting data frames from {ggstatsplot} plots
ggcorrmat

Visualization of a correlation matrix
iris_long

Edgar Anderson's Iris Data in long format.
grouped_ggbetweenstats

Violin plots for group or condition comparisons in between-subjects designs repeated across all levels of a grouping variable.
grouped_ggbarstats

Grouped bar charts with statistical tests
movies_long

Movie information and user ratings from IMDB.com (long format).
ggbarstats

Stacked bar charts with statistical tests
ggbetweenstats

Box/Violin plots for between-subjects comparisons