n_fun | R Documentation |
Output the number of data points in a box plot.
For use within ggplot2::stat_summary()
.
n_fun(x)
x |
smth |
## Not run:
diamonds %>%
ggplot(aes(x = cut, y = depth)) +
geom_boxplot() +
stat_summary(fun.data = n_fun, geom = "text", size = 5, color = "blue")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.