n_fun: n_fun function

View source: R/n_fun.R

n_funR Documentation

n_fun function

Description

Output the number of data points in a box plot. For use within ggplot2::stat_summary().

Usage

n_fun(x)

Arguments

x

smth

Examples

## 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)

vrognas/vmisc documentation built on Oct. 27, 2023, 8:09 a.m.