knitr::opts_chunk$set(comment = "#>", collapse = TRUE)
jjstatsplot
provides easy wrappers around functions from the
ggstatsplot
package.
These wrappers are primarily used by the jamovi interface but can also
be called directly from R. The package includes functions for creating
bar charts, box--violin plots, scatter plots, histograms, and more while
reporting relevant statistical tests automatically.
The main functions exported are:
jjbarstats()
-- bar charts for categorical variablesjjbetweenstats()
-- compare continuous variables between groupsjjcorrmat()
-- correlation matrix visualisationsjjdotplotstats()
-- dot charts with summary statisticsjjhistostats()
-- histograms with statistical annotationsjjpiestats()
-- pie charts for categorical datajjscatterstats()
-- scatter plots with regression detailsjjwithinstats()
-- paired comparisons of repeated measuresAll functions return a jamovi results object, but the primary component
of interest is usually the generated ggplot2 object stored in the
plot
element. In this vignette we give a quick overview of how to call
the wrappers from R.
We will use the built-in mtcars
data set for the examples below.
library(jjstatsplot) data(mtcars) head(mtcars)
The following sections demonstrate some of the available plots.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.