Last active
April 7, 2022 17:58
-
-
Save charliejhadley/aa77a543e5775d004b279fdfa765cc41 to your computer and use it in GitHub Desktop.
errors-ggplot2.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(palmerpenguins) | |
penguins %>% | |
count(island) %>% | |
mutate(error = 12) %>% | |
ggplot(aes(x = n, | |
y = island)) + | |
geom_col() + | |
geom_text(aes(label = str_glue("{n} ± {error}")), | |
color = "white", | |
fontface = "bold", | |
hjust = 1.1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment