gghist is a wrapper around ggplot2’s geom_histogram() to easily plot a
histogram of a numeric vector. This is especially useful, since
qplot() was deprecated in ggplot2 3.4.0.
You can install the current release from CRAN via
install.packages("gghist")
or the development version from Github via
# devtools::install_github("frederikziebell/gghist")
install.packages("gghist", repos = c('https://frederikziebell.r-universe.dev', 'https://cloud.r-project.org'))
library(gghist)
x <- rnorm(100)
gghist(x)
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

x <- exp(rnorm(1000))
gghist(x, bins = 100, fill = "firebrick") +
scale_x_log10()