add_sem_ribbon {tidyplots} | R Documentation |
Add ribbon
Description
-
add_sem_ribbon()
adds the standard error of mean. -
add_range_ribbon()
adds the range from smallest to largest value. -
add_sd_ribbon()
adds the standard deviation. -
add_ci95_ribbon()
adds the 95% confidence interval.
Usage
add_sem_ribbon(plot, dodge_width = NULL, alpha = 0.4, color = NA, ...)
add_range_ribbon(plot, dodge_width = NULL, alpha = 0.4, color = NA, ...)
add_sd_ribbon(plot, dodge_width = NULL, alpha = 0.4, color = NA, ...)
add_ci95_ribbon(plot, dodge_width = NULL, alpha = 0.4, color = NA, ...)
Arguments
plot |
A |
dodge_width |
For adjusting the distance between grouped objects. Defaults
to |
alpha |
A |
color |
A hex color for the stroke color. For example, |
... |
Arguments passed on to the |
Value
A tidyplot
object.
Examples
# Standard error of the mean
time_course |>
tidyplot(x = day, y = score, color = treatment) |>
add_mean_line() |>
add_sem_ribbon()
# Range from minimum to maximum value
time_course |>
tidyplot(x = day, y = score, color = treatment) |>
add_mean_line() |>
add_range_ribbon()
# Standard deviation
time_course |>
tidyplot(x = day, y = score, color = treatment) |>
add_mean_line() |>
add_sd_ribbon()
# 95% confidence interval
time_course |>
tidyplot(x = day, y = score, color = treatment) |>
add_mean_line() |>
add_ci95_ribbon()
# Changing arguments: alpha
time_course |>
tidyplot(x = day, y = score, color = treatment) |>
add_mean_line() |>
add_sem_ribbon(alpha = 0.7)
[Package tidyplots version 0.3.1 Index]