MyNixOS website logo
Description

A Rainclouds Geom for 'ggplot2'.

The 'geom_rain()' function adds different geoms together using 'ggplot2' to create raincloud plots.

R-CMD-check Bugs CRAN_Release_Badge CRAN_Download_Badge Vignette

ggrain - Raincloud Plots

ggrain is an R-package that allows you to create Raincloud plots - following the 'Grammar of Graphics' (i.e., ggplot2) - that are:

  • Highly customizable
  • Connect longitudinal observations
  • Handles Likert data
  • Allows mapping of a covariate.
	

Example

ggplot(iris, aes(x = 1, y = Sepal.Length)) +
  geom_rain()

Installation

There are two ways to install this package.

  1. Download the CRAN version
install.packages("ggrain")

library(ggrain)
  1. Download through GitHub
if (!require(remotes)) {
    install.packages("remotes")
}
remotes::install_github('njudd/ggrain')

library(ggrain)

Simple examples

  1. Raincloud per group

    ggplot(iris, aes(x = Species, y = Sepal.Length, fill = 	Species)) +
        geom_rain(rain.side = 'l')
    
  2. Different groups overlapped

    ggplot(iris, aes(x = 1, y = Sepal.Length, fill = Species)) +
        geom_rain(alpha = .5)
    

img

Vignette

For a complete overview of ggrain such as a 2-by-2 raincloud plot or multiple repeated measures, please see our Vignette.

ggrain specific features

geom_rain is a combination of 4 different ggplot2 geom's (i.e., point, line, boxplot & violin).

  • id.long.var: a grouping variable to connect the lines by
  • cov: a covariate to remap the color of the points
  • Likert: True or False response which adds y jittering
  • rain.side: Which side to display the rainclouds: 'l' for left, 'r' for right and 'f' for flanking

Specific geom arguments can be passed with a list to any of the 4 geom's with the argument {point/line/boxplot/violin}.args. For a list of arguments that can be passed see the help files of the respective geom's (e.g., ?gghalves::geom_half_violin).

Position-related arguments (e.g., jittering, nudging & width) can be passed with {point/line/boxplot/violin}.args.pos, see the help file of ?geom_rain for defaults

img

Contributions / Issues

We warmly welcome all contributions. You can open an issue or make a pull request if you would like to add something new!

Citation

ggrain was developed by Nicholas Judd, Jordy van Langen, Micah Allen, and Rogier Kievit.

- Judd, N., van Langen, J., Allen, M., & Kievit, R.A.
    ggrain: A Rainclouds Geom for 'ggplot2'.
    R package version 0.0.3.
    CRAN 2023,
    https://CRAN.R-project.org/package=ggrain

Funding

In 2021, NWO (Dutch research council) announced their inaugural NWO Open Science Fund. The Open Science Fund aims to support researchers to develop, test and implement innovative ways of making research open, accessible, transparent and reusable, covering the whole range of Open Science. The Raincloud plots team was awarded this fantastic initiative and is specifically working on:

You can read more about our awarded project here: https://www.nwo.nl/en/projects/203001011 or you can watch the online webinar hosted by NWO about our project: Webinar Open Science series S1E2: Open tools for data enrichment and visualization

Raincloud Plots

Paper

- Allen, M., Poggiali, D., Whitaker, K., Marshall, T. R., van Langen, J., & Kievit, R. A.
    Raincloud plots: a multi-platform tool for robust data visualization [version 2; peer review: 2 approved] 
    Wellcome Open Research 2021, 4:63. https://doi.org/10.12688/wellcomeopenres.15191.2

There are now 4 ways in which you can use our Raincloud Plots tools:

Metadata

Version

0.0.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows