| plot.hrest | R Documentation |
hrest objectreturns a ggplot object representing the hrest object from
estimate. The content of left panel varies according to the
value of the which parameter. If which = "rank_simulation" is
used a plot of rank score values will be plotted in the left panel. In this
case technical replicates will be averaged if provided. If
which = "just_data" a plot of scores only is created and technical
replicates are displayed as is. In each case, the right hand panel shows the
rank bootstrap distribution and confidence interval boundaries for all non-
control groups.
## S3 method for class 'hrest'
plot(
x,
...,
which = "rank_simulation",
theme = "modern",
colors = "okabe_ito",
config = NULL,
show_significance = FALSE,
show_effect_size = FALSE
)
x |
the |
... |
Other parameters (ignored) |
which |
the type of left hand panel to create. Either "rank_simulation" or "just_data" |
theme |
the visual theme to use. Either "modern" (default, cleaner contemporary style) or "classic" (original besthr appearance) |
colors |
the color palette to use. Either "okabe_ito" (default, colorblind-safe), "default" (original colors), or "viridis" |
config |
an optional besthr_plot_config object for advanced customization. If provided, theme and colors parameters are ignored. |
show_significance |
Logical, whether to show significance stars on groups where CI doesn't overlap control (default FALSE) |
show_effect_size |
Logical, whether to show effect size annotation (default FALSE) |
ggplot object
d1 <- make_data()
hr_est <- estimate(d1, score, group)
plot(hr_est)
# Use modern theme with colorblind-safe palette
plot(hr_est, theme = "modern", colors = "okabe_ito")
# Advanced configuration
cfg <- besthr_plot_config(
panel_widths = c(2, 1),
point_size_range = c(3, 10)
)
plot(hr_est, config = cfg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.