It's possible to use the tidyplots library in jamovi using R code.
Thanks to Vincent (@vjalby) for helping me with the installation.
Preparation
1. install R.app
2. In the R console (R.app) install the following libraries
install.packages("tidyplots")
install.packages(„jmvconnect“)
install.packages("tidyverse")
install.packages("ggplot2")
install.packages("ggpubr") —> do not know if this is really needed
3. In Jamovi
- install the Rj module
- select the Rj editor from Rj module menu
- With the wheel icon in Rj window select "System R" and define plot dimensions
Now you can code tidyplots within jamovi.
Example 1:
Code: Select all
library(tidyplots)
study |>
tidyplot(x = treatment, y = score, color = treatment) |>
add_boxplot() |>
add_test_pvalue(ref.group = 1)
Example 2
Code: Select all
library(tidyplots)
study |>
tidyplot(width = 600, height = 500, unit = 'pt',
x = score, y = treatment, color = treatment) |>
add_mean_bar(alpha = 0.3) |>
add_sem_errorbar() |>
add_data_points() |>
theme_tidyplot(font-size = 14)
Example 3
Code: Select all
library(tidyplots)
study |>
tidyplot(width = 600, height = 500, unit = 'pt',
x = treatment, y = score, color = treatment) |>
add_violin() |>
add_data_points_beeswarm()|>
theme_tidyplot(fontsize = 14)