plot_raincloud {sdamr}R Documentation

Create a raincloud plot

Description

Create a raincloud plot

Usage

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

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)?")

[Package sdamr version 0.0.0.9005 Index]