plot_raincloud: Create a raincloud plot

Description Usage Arguments Source Examples

View source: R/plot_raincloud.R

Description

Create a raincloud plot

Usage

1
plot_raincloud(data, y, horizontal = FALSE, groups, point_size = 0.5, ...)

Arguments

data

Data.frame (or tibble)

y

The unquoted name of the variable in data for which to create the raincloud plot

horizontal

(logical) change the orientation of the plot

groups

An unquoted name of grouping variable in data (ideally a factor)

point_size

Size of the jittered points

...

Other arguments, passed to ggplot(aes(...))

Source

Allen M, Poggiali D, Whitaker K et al. Raincloud plots: a multi-platform tool for robust data visualization. Wellcome Open Res 2019, 4:63 (https://doi.org/10.12688/wellcomeopenres.15191.1)

Examples

1
2
3
4
5
6
data(anchoring)
plot_raincloud(anchoring,y=everest_feet)
plot_raincloud(anchoring,y=everest_feet,groups=anchor)
plot_raincloud(anchoring,y=everest_feet,groups=anchor) + 
    ggplot2::facet_wrap(~us_or_international) + 
    ggplot2::ylab("How high is Mount Everest (in feet)?")

sdamr documentation built on Nov. 19, 2020, 3 a.m.