Add a raincloud plot to a chronicle report
add_raincloud(
report = "",
dt,
value,
groups = NULL,
adjust = 0.5,
include_boxplot = TRUE,
include_mean = FALSE,
include_median = TRUE,
force_all_jitter_obs = FALSE,
ggtheme = "minimal",
x_axis_label = NULL,
plot_palette = NULL,
plot_palette_generator = NULL,
static = NULL,
raincloud_title = NULL,
title_level = 2,
echo = FALSE,
message = FALSE,
warning = FALSE,
fig_width = NULL,
fig_height = NULL
)
Character string containing all the R Markdown chunks previously added. Default is '', an empty report.
data.frame containing the data to plot.
Name of the column to use as values on the y axis of the plot.
Name of the column containing the different groups.
Width of the kernel bins. The smaller the value, the higher the resolution of the density. For full details, see ?ggplot2::stat_density.
Include a boxplot over the raincloud. Default is TRUE.
Mark the median of each distribution. Default is TRUE.
Mark the mean of each distribution. Default is FALSE.
When the data has more than 1000 observations, the function will sample 1000 observations in order to keep the object reasonably small. If you need to override it, set this value to TRUE.
ggplot2 theme function to apply. Default is ggplot2::theme_minimal.
Label for the x axis.
Character vector of hex codes specifying the colors to use on the plot.
Palette from the viridis package used in case plot_palette is unspecified or insufficient for the number of colors required.
If TRUE, the output will be static ggplot chart instead of an interactive ggplotly chart. Default is FALSE.
Title of the raincloud plot section on the report. If NULL, chronicle will try to parse a generic title using make_title()
Level of the section title of this plot (ie, number of # on Rmarkdown syntax.)
Whether to display the source code in the output document. Default is FALSE.
Whether to preserve messages on rendering. Default is FALSE.
Whether to preserve warnings on rendering. Default is FALSE.
Width of the plot (in inches).
Height of the plot (in inches).
An rmarkdown file as a character string, now containing a chunk for adding the specified raincloud plot.
# NOT RUN {
html_report <- add_raincloud(report = "",
dt = iris,
value = 'Sepal.Length',
groups = 'Species')
cat(html_report)
# }
Run the code above in your browser using DataLab