Description Usage See Also Examples
Dataset contains only 'y' and 'factor(x)'. The heights of the bars represent y-values against x-factors.
1 2 3 | ggbar_MeanSD(x, y, fill.bar = NULL, width.bar = 0.5, col.border = NULL,
size.border = 1, alpha = 1, width.errorbar = 0.3, col.errorbar = NULL,
size.errorbar = 1)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library(R11)
y = iris$Sepal.Length
x = iris$Species
# vertical
ggbar_MeanSD(x, y)
# horizontal
ggbar_MeanSD(x, y, alpha = 0.5) +
coord_flip()
# set colors
ggbar_MeanSD(x, y, fill.bar = c("grey10", "grey50", "grey70"))+
theme_bw()
# set ylim using coor_cartesian()
ggbar_MeanSD(x, y, alpha = 0.5) +
coord_cartesian(ylim = c(0, 10))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.