# \donttest{
library(ggplot2)
histogram_plot <- function(df, var, binwidth) {
ggplot(df, aes(x = {{ var }})) +
geom_histogram(binwidth = binwidth) +
labs(title = str_englue("A histogram of {{var}} with binwidth {binwidth}"))
}
histogram_plot(iris, Sepal.Length, binwidth = 0.1)
# }
Run the code above in your browser using DataLab