gbar.error | R Documentation |
Barplot with confidence intervals. To plot with confidence intervals around an event that has a binary outcome with a simple example:
gbar.error(
y,
conf.low,
conf.high,
group,
wes = "Royal1",
other.palette = NULL,
print = TRUE,
fill = NULL,
stat = "identity",
facet1 = NULL,
facet2 = NULL,
bar.width = 0.9,
position = position_dodge(width = 0.9),
transpose = FALSE,
facet.scales = "fixed"
)
y |
any numeric vector, can be a fraction |
conf.low |
the lower bound of the confidence interval around y |
conf.high |
the upper bound of the confidence interval around y |
heads = 30, tails = 20, y = heads / (heads + tails) dt = binom.conf(y, heads + tails) conf.low = dt$conf.low conf.high = dt$conf.high
gbar.error(y, conf.low, conf.high)
A ggplot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.