### Basic Plot with ggbetweenstats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/paper/JOSS files/paper.md Generates a plot comparing groups with embedded statistical details. Requires the palmerpenguins dataset and the ggstatsplot package. Note: The example shows an error indicating the function is not found, suggesting a setup or installation issue. ```r library(palmerpenguins) # for 'penguins' dataset ggbetweenstats(penguins, species, body_mass_g) #> Error in ggbetweenstats(penguins, species, body_mass_g): could not find function "ggbetweenstats" ``` -------------------------------- ### Install ggstatsplot Development Version Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Install the latest development version of the ggstatsplot package using the pak package manager. ```r pak::pak("IndrajeetPatil/ggstatsplot") ``` -------------------------------- ### Install ggstatsplot from CRAN Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Use this command to install the stable release version of the ggstatsplot package from CRAN. ```r install.packages("ggstatsplot") ``` -------------------------------- ### Custom ggplot with ggstatsplot Statistics (Scatterplot) Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Apply the same approach as the boxplot example to create a custom scatterplot. Extract statistical expressions from `ggscatterstats` using `extract_subtitle()` and embed them in a `ggplot2` scatterplot with custom aesthetics. ```r corr_stats <- ggscatterstats(iris, Sepal.Length, Petal.Length) |> extract_subtitle() ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color = Species)) + geom_point(size = 3, alpha = 0.7) + geom_smooth(method = "lm", se = FALSE) + labs( title = "Sepal vs Petal Length", subtitle = corr_stats ) + theme_classic() ``` -------------------------------- ### Get Citation for ggstatsplot Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Run this R code to retrieve the citation information for the ggstatsplot package, including a BibTeX entry for LaTeX users. ```r citation("ggstatsplot") ``` -------------------------------- ### Create Pie Chart with Contingency Table Analysis Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Use ggpiestats to create a pie chart for categorical variables, including results from Pearson's chi-squared test or McNemar's chi-squared test in the subtitle. If only one variable is provided, a one-sample proportion test result is displayed. ```r set.seed(123) ggpiestats( data = mtcars, x = am, y = cyl, palette = "wesanderson::Royal1", title = "Dataset: Motor Trend Car Road Tests", legend.title = "Transmission" ) ``` -------------------------------- ### Check Palette Sufficiency with .is_palette_sufficient Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/tests/testthat/_snaps/utils.md Verifies if a given color palette has enough colors for the required number of groups. If insufficient, it provides an error message with guidance on selecting an alternative palette. ```R .is_palette_sufficient("ggthemes::gdoc", 30L) ``` -------------------------------- ### Create Histogram with One-Sample Test using gghistostats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Use gghistostats to visualize the distribution of a single variable and perform a one-sample test against a specified value. Requires the ggplot2 package for data. ```r set.seed(123) gghistostats( data = ggplot2::msleep, x = awake, title = "Amount of time spent awake", test.value = 12, binwidth = 1 ) ``` -------------------------------- ### Create Pie Charts with Contingency Table Analysis using ggpiestats Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Generates pie charts for categorical data with chi-squared or goodness-of-fit test results. Supports one-way, two-way, and Bayesian analyses, as well as grouped pie charts. ```r library(ggstatsplot) set.seed(123) # One-sample goodness-of-fit test ggpiestats( data = mtcars, x = vs, title = "Engine type distribution" ) ``` ```r # Two-way association test (chi-squared) ggpiestats( data = mtcars, x = am, y = cyl, palette = "wesanderson::Royal1", title = "Dataset: Motor Trend Car Road Tests", legend.title = "Transmission" ) ``` ```r # Bayesian contingency analysis ggpiestats( data = mtcars, x = vs, y = cyl, type = "bayes", title = "Bayesian contingency table analysis" ) ``` ```r # Using pre-aggregated data with counts ggpiestats( data = as.data.frame(Titanic), x = Survived, y = Class, counts = Freq, # Specify count column label = "both" # Show both counts and percentages ) ``` ```r # Grouped pie charts grouped_ggpiestats( data = mtcars, x = cyl, grouping.var = am, label.repel = TRUE, # Prevent label overlap palette = "ggsci::default_ucscgb", annotation.args = list(title = "Cylinder distribution by transmission") ) ``` -------------------------------- ### Create Coefficient Plots for Regression Models using ggcoefstats Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Generates dot-and-whisker plots for regression model coefficients, displaying estimates with confidence intervals. Automatically extracts model information and fit statistics. ```r library(ggstatsplot) set.seed(123) # Linear model coefficient plot mod <- lm(formula = mpg ~ am * cyl, data = mtcars) ggcoefstats(mod) ``` ```r # Exclude intercept and show only significant terms ggcoefstats( mod, exclude.intercept = TRUE, only.significant = TRUE, title = "Significant predictors of MPG" ) ``` ```r # ANOVA model (shows F-statistic with effect sizes) ggcoefstats( aov(mpg ~ cyl * am, data = mtcars), effectsize.type = "omega" # Options: "eta", "omega", "epsilon" ) ``` ```r # Using a tidy data frame directly (model-free) df_estimates <- data.frame( term = c("Age", "Education", "Experience"), estimate = c(0.5, -0.2, 1.1), std.error = c(0.1, 0.15, 0.2), conf.low = c(0.3, -0.49, 0.71), conf.high = c(0.7, 0.09, 1.49), statistic = c(5.0, -1.33, 5.5), p.value = c(0.001, 0.18, 0.0001) ) ggcoefstats( df_estimates, statistic = "t", stats.label.color = c("firebrick", "grey50", "forestgreen") ) ``` ```r # Meta-analysis with regression estimates ggcoefstats( df_estimates, meta.analytic.effect = TRUE, meta.type = "parametric", # Options: "parametric", "robust", "bayes" bf.message = TRUE ) ``` ```r # Mixed-effects model (requires lme4 package) # library(lme4) # ggcoefstats( # lmer(Reaction ~ Days + (Days | Subject), sleepstudy), # effects = "fixed" # ) ``` -------------------------------- ### Basic Correlation Matrix with ggcorrmat Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Generates a basic correlation matrix heatmap with specified colors and titles. Uses a dataset of mammalian sleep data. ```r ggcorrmat( data = ggplot2::msleep, colors = c("#B2182B", "white", "#4D4D4D"), title = "Correlalogram for mammals sleep dataset", subtitle = "sleep units: hours; weight units: kilograms" ) ``` -------------------------------- ### Visualize Regression Model Coefficients Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Use ggcoefstats to visualize regression model coefficients with confidence intervals and summary statistics. Requires a fitted model object. ```r mod <- stats::lm(formula = mpg ~ am * cyl, data = mtcars) ggcoefstats(mod) ``` -------------------------------- ### Create Grouped Histograms with Statistical Tests using grouped_gghistostats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Use grouped_gghistostats to visualize distributions and perform statistical tests for a variable across different groups. Filters data using dplyr and applies custom themes. ```r set.seed(123) grouped_gghistostats( data = dplyr::filter(movies_long, genre %in% c("Action", "Comedy")), x = budget, test.value = 50, type = "nonparametric", xlab = "Movies budget (in million US$)", grouping.var = genre, ggtheme = ggthemes::theme_tufte(), ## modify the defaults from `{ggstatsplot}` for each plot plotgrid.args = list(nrow = 1), annotation.args = list(title = "Movies budgets for different genres") ) ``` -------------------------------- ### Create Violin Plot with ggbetweenstats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Generates a violin plot for between-group comparisons of Sepal.Length across Iris species. Requires the iris dataset. ```r set.seed(123) ggbetweenstats( data = iris, x = Species, y = Sepal.Length, title = "Distribution of sepal length across Iris species" ) ``` -------------------------------- ### gghistostats: Distribution Analysis with One-Sample Tests Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Use gghistostats to create histograms for distribution analysis, including one-sample tests comparing the mean to a specified value. It displays counts and proportions on dual y-axes and marks the centrality measure. ```r library(ggstatsplot) set.seed(123) # Basic histogram with one-sample t-test gghistostats( data = ggplot2::msleep, x = awake, title = "Amount of time spent awake", test.value = 12, # Test if mean differs from 12 binwidth = 1 ) ``` -------------------------------- ### Create Grouped Pie Charts with Statistical Analysis Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Use grouped_ggpiestats to create multiple pie charts for different levels of a grouping variable, facilitating the analysis of proportions for a single nominal variable across groups. ```r set.seed(123) grouped_ggpiestats( data = mtcars, x = cyl, grouping.var = am, label.repel = TRUE, palette = "ggsci::default_ucscgb" ) ``` -------------------------------- ### Create Bar Chart with Contingency Table Analysis Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Use ggbarstats to create a bar chart for categorical variables, similar to ggpiestats, but with a bar chart visualization. It also includes results from contingency table analysis in the subtitle. ```r set.seed(123) library(ggplot2) ggbarstats( data = movies_long, x = mpaa, y = genre, title = "MPAA Ratings by Genre", xlab = "movie genre", legend.title = "MPAA rating", ggplot.component = list(ggplot2::scale_x_discrete(guide = ggplot2::guide_axis(n.dodge = 2))), palette = "RColorBrewer::Set2" ) ``` -------------------------------- ### Create Bar Charts with Contingency Table Analysis using ggbarstats Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Generates stacked bar charts for contingency table analysis, offering a clearer visual comparison of proportions across groups. Supports one-way, two-way, and grouped analyses. ```r library(ggstatsplot) set.seed(123) # Two-way association test with bar chart ggbarstats( data = movies_long, x = mpaa, y = genre, title = "MPAA Ratings by Genre", xlab = "Movie genre", legend.title = "MPAA rating", palette = "RColorBrewer::Set2" ) ``` ```r # One-sample goodness-of-fit test ggbarstats( data = mtcars, x = cyl, label = "both", title = "Cylinder distribution in mtcars" ) ``` ```r # Grouped bar chart analysis grouped_ggbarstats( data = mtcars, x = cyl, grouping.var = am, label.repel = TRUE, palette = "ggsci::default_ucscgb", annotation.args = list(title = "Engine cylinders by transmission type") ) ``` -------------------------------- ### Partial Correlation Matrix with Bayesian Method Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Generates a partial correlation matrix using the Bayesian method. Selects specific variables and displays the matrix. ```r ggcorrmat( data = mtcars, cor.vars = c(mpg, disp, hp, wt, qsec), partial = TRUE, type = "bayes", title = "Partial correlation matrix" ) ``` -------------------------------- ### Use .grouped_list with Non-Syntactic Group Names Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/tests/testthat/_snaps/utils.md Demonstrates how to use the .grouped_list function when the grouping variable has a non-syntactic name. Ensure the grouping variable is correctly referenced using backticks. ```R str(.grouped_list(rename(sleep, `my non-syntactic name` = group), grouping.var = `my non-syntactic name`)) ``` -------------------------------- ### Scatterplot with Customized Marginal Histograms Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Creates a scatterplot with customized marginal histograms, specifying colors, bin counts, and break points for the axes. ```r ggscatterstats( data = mtcars, x = wt, y = mpg, xsidehistogram.args = list(fill = "#009E73", color = "black", binwidth = 0.5), ysidehistogram.args = list(fill = "#D55E00", color = "black", bins = 15), xsidehistogram.scale = list(breaks = seq(0, 15, 5)), ysidehistogram.scale = list(breaks = seq(0, 15, 5)) ) ``` -------------------------------- ### Basic Scatterplot with Pearson Correlation Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Creates a scatterplot with marginal histograms and Pearson correlation analysis. Uses a dataset of mammalian sleep data. ```r ggscatterstats( data = ggplot2::msleep, x = sleep_rem, y = awake, xlab = "REM sleep (in hours)", ylab = "Amount of time spent awake (in hours)", title = "Understanding mammalian sleep" ) ``` -------------------------------- ### ggbetweenstats: Between-Group Comparisons Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Use ggbetweenstats for comparing groups with violin/box plots. It automatically selects appropriate tests (t-test, ANOVA) and displays results. Customize tests, pairwise comparisons, and add Bayes Factors. ```r library(ggstatsplot) set.seed(123) # Basic between-group comparison (automatically runs Welch's ANOVA) ggbetweenstats( data = iris, x = Species, y = Sepal.Length, title = "Distribution of sepal length across Iris species" ) ``` ```r ggbetweenstats( data = mtcars, x = am, y = mpg, type = "robust", # Options: "parametric", "nonparametric", "robust", "bayes" pairwise.display = "significant", # Options: "significant", "non-significant", "all", "none" p.adjust.method = "bonferroni", bf.message = TRUE, # Show Bayes Factor in caption centrality.plotting = TRUE, # Show mean/median point xlab = "Transmission (0 = automatic, 1 = manual)", ylab = "Miles per gallon" ) ``` -------------------------------- ### Create Within-Subjects Plot with ggwithinstats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Generates a within-subjects plot for comparing Taste ratings across different Wines, specifying the subject identifier. Requires WineTasting dataset and WRS2/afex libraries. ```r set.seed(123) library(WRS2) ## for data library(afex) ## to run ANOVA ggwithinstats( data = WineTasting, x = Wine, y = Taste, subject.id = Taster, title = "Wine tasting" ) ``` -------------------------------- ### Extract stats from ggcoefstats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/tests/testthat/_snaps/extract-stats.md Shows how to extract statistical information from a ggcoefstats plot, which visualizes regression coefficients. Subtitle and caption are typically NULL for this plot type. ```R p7 <- ggcoefstats(lm(wt ~ mpg, mtcars)) list(length(extract_stats(p7)), extract_subtitle(p7), extract_caption(p7)) ``` -------------------------------- ### Create Grouped Bar Charts with Statistical Analysis Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Use grouped_ggbarstats to create multiple bar charts for different levels of a grouping variable, enabling the analysis of proportions for a single nominal variable across groups using bar charts. ```r set.seed(123) grouped_ggbarstats( data = mtcars, x = cyl, grouping.var = am, label.repel = TRUE, palette = "ggsci::default_ucscgb" ) ``` -------------------------------- ### Create Grouped Violin Plots with grouped_ggbetweenstats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Generates grouped violin plots for comparing movie length by MPAA ratings across different genres. Uses dplyr for filtering and specifies annotation and significance arguments. ```r set.seed(123) grouped_ggbetweenstats( data = dplyr::filter(movies_long, genre %in% c("Action", "Comedy")), x = mpaa, y = length, grouping.var = genre, ggsignif.args = list(textsize = 4, tip_length = 0.01), p.adjust.method = "bonferroni", palette = "ggsci::default_jama", plotgrid.args = list(nrow = 1), annotation.args = list(title = "Differences in movie length by mpaa ratings for different genres") ) ``` -------------------------------- ### Generate Dot-and-Whisker Plots for Regression Models Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md The ggcoefstats function generates dot-and-whisker plots for regression models, utilizing tidy data frames prepared by parameters::model_parameters() and model performance indices from performance::model_performance(). ```r set.seed(123) ``` -------------------------------- ### Extracting Statistical Results for Custom Plots in R Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Load necessary libraries and extract statistical results using ggbetweenstats to be used as a subtitle in a custom ggplot. Ensure the data and aesthetic mappings are correctly specified. ```r ## loading the needed libraries set.seed(123) library(ggplot2) ## using `{ggstatsplot}` to get expression with statistical results stats_results <- ggbetweenstats(morley, Expt, Speed) |> extract_subtitle() ## creating a custom plot of our choosing ggplot(morley, aes(x = as.factor(Expt), y = Speed)) + geom_boxplot() + labs( title = "Michelson-Morley experiments", subtitle = stats_results, x = "Speed of light", y = "Experiment number" ) ``` -------------------------------- ### Correlation Matrix with Selected Variables and Robust Correlation Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Creates a correlation matrix heatmap for selected variables using robust correlation. Adjusts p-values using the Holm method and sets a significance level. ```r ggcorrmat( data = iris, cor.vars = c(Sepal.Length, Sepal.Width, Petal.Length, Petal.Width), type = "robust", matrix.type = "lower", p.adjust.method = "holm", sig.level = 0.01 ) ``` -------------------------------- ### Extract stats from ggscatterstats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/tests/testthat/_snaps/extract-stats.md Demonstrates extracting statistical details from a ggscatterstats plot. Note that the caption might be NULL for certain plot configurations. ```R p2 <- ggscatterstats(mtcars, wt, mpg, marginal = FALSE, type = "r") list(length(extract_stats(p2)), extract_subtitle(p2), extract_caption(p2)) ``` -------------------------------- ### Create Grouped Dot Plots with Bayesian Test using grouped_ggdotplotstats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Use grouped_ggdotplotstats to create grouped dot plots with Bayesian tests, visualizing a numeric variable across categories. Filters data using dplyr and customizes point aesthetics. ```r set.seed(123) grouped_ggdotplotstats( data = dplyr::filter(ggplot2::mpg, cyl %in% c("4", "6")), x = cty, y = manufacturer, type = "bayes", xlab = "city miles per gallon", ylab = "car manufacturer", grouping.var = cyl, test.value = 15.5, point.args = list(color = "red", size = 5, shape = 13), annotation.args = list(title = "Fuel economy data") ) ``` -------------------------------- ### Create Grouped Scatterplot with Marginal Distributions using grouped_ggscatterstats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Creates grouped scatterplots with marginal distributions and statistical tests, repeating the operation across a single grouping variable. Ideal for comparing relationships between variables across different categories. ```r set.seed(123) grouped_ggscatterstats( data = dplyr::filter(movies_long, genre %in% c("Action", "Comedy")), x = rating, y = length, grouping.var = genre, label.var = title, label.expression = length > 200, xlab = "IMDB rating", ggtheme = ggplot2::theme_grey(), ggplot.component = list(ggplot2::scale_x_continuous(breaks = seq(2, 9, 1), limits = (c(2, 9)))), plotgrid.args = list(nrow = 1), annotation.args = list(title = "Relationship between movie length and IMDB ratings") ) ``` -------------------------------- ### Grouped Histogram Analysis with grouped_gghistostats Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Analyzes and plots grouped histograms with a specified test value and grouping variable. Customizes theme and plot grid layout. ```r grouped_gghistostats( data = dplyr::filter(movies_long, genre %in% c("Action", "Comedy")), x = budget, test.value = 50, type = "nonparametric", xlab = "Movies budget (in million US$)", grouping.var = genre, ggtheme = ggthemes::theme_tufte(), plotgrid.args = list(nrow = 1), annotation.args = list(title = "Movies budgets for different genres") ) ``` -------------------------------- ### Extract stats from ggcorrmat Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/tests/testthat/_snaps/extract-stats.md Shows how to extract statistical information from a ggcorrmat plot. For this plot type, both subtitle and caption are typically NULL. ```R p3 <- ggcorrmat(iris) list(length(extract_stats(p3)), extract_subtitle(p3), extract_caption(p3)) ``` -------------------------------- ### Create Dot Plot with Robust One-Sample Test using ggdotplotstats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Use ggdotplotstats to visualize the distribution of a numeric variable against a categorical label and perform a robust one-sample test. Filters data using dplyr. ```r set.seed(123) ggdotplotstats( data = dplyr::filter(gapminder::gapminder, continent == "Asia"), y = country, x = lifeExp, test.value = 55, type = "robust", title = "Distribution of life expectancy in Asian continent", xlab = "Life expectancy" ) ``` -------------------------------- ### Create Grouped Correlation Matrix with grouped_ggcorrmat Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Generates grouped correlation matrices, allowing for the visualization of correlation patterns across different categories. This is useful for comparing correlation structures between subsets of data defined by a grouping variable. ```r set.seed(123) grouped_ggcorrmat( data = dplyr::filter(movies_long, genre %in% c("Action", "Comedy")), type = "robust", colors = c("#cbac43", "white", "#550000"), grouping.var = genre, matrix.type = "lower" ) ``` -------------------------------- ### Extract stats from ggbarstats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/tests/testthat/_snaps/extract-stats.md Demonstrates extracting statistical data from a ggbarstats plot, including Pearson's chi-squared test and Bayesian analysis. ```R p6 <- ggbarstats(mtcars, cyl, am) list(length(extract_stats(p6)), extract_subtitle(p6), extract_caption(p6)) ``` -------------------------------- ### Create Grouped Within-Subjects Plot with grouped_ggwithinstats Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Generates grouped within-subjects plots comparing desire to kill arthropods by condition for different regions. Specifies subject ID, plot type, and labels. ```r set.seed(123) grouped_ggwithinstats( data = dplyr::filter(bugs_long, region %in% c("Europe", "North America"), condition %in% c("LDLF", "LDHF")), x = condition, y = desire, subject.id = subject, type = "np", xlab = "Condition", ylab = "Desire to kill an artrhopod", grouping.var = region ) ``` -------------------------------- ### Basic Dot Plot with ggdotplotstats Source: https://context7.com/indrajeetpatil/ggstatsplot/llms.txt Creates a basic dot plot with a robust one-sample test for a numeric variable against a categorical variable. Filters data for a specific continent. ```r ggdotplotstats( data = dplyr::filter(gapminder::gapminder, continent == "Asia"), y = country, x = lifeExp, test.value = 55, type = "robust", title = "Distribution of life expectancy in Asian continent", xlab = "Life expectancy" ) ``` -------------------------------- ### Create Correlation Matrix with ggcorrmat Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/README.md Generates a publication-ready correlation matrix (correlalogram) with minimal code. This function is useful for quickly visualizing pairwise correlations between variables in a dataset, including effect sizes and significance. ```r set.seed(123) ## as a default this function outputs a correlation matrix plot ggcorrmat( data = ggplot2::msleep, colors = c("#B2182B", "white", "#4D4D4D"), title = "Correlalogram for mammals sleep dataset", subtitle = "sleep units: hours; weight units: kilograms" ) ``` -------------------------------- ### Extract stats from ggbetweenstats (F-test) Source: https://github.com/indrajeetpatil/ggstatsplot/blob/main/tests/testthat/_snaps/extract-stats.md Extracts statistical details from a ggbetweenstats plot, specifically showing F-test results when comparing multiple groups. ```R p4 <- ggbetweenstats(mtcars, cyl, mpg) list(length(extract_stats(p4)), extract_subtitle(p4), extract_caption(p4)) ```