gghist: Histogram wrapper for continuous covariates

View source: R/fn_gg.R

gghistR Documentation

Histogram wrapper for continuous covariates

Description

Create histograms for all numeric variables in a dataset. Non-numeric variables will be dropped.

Usage

gghist(d, cols, bins = 30, nsub = TRUE, ...)

Arguments

d

⁠<dfr>⁠ A data frame.

cols

⁠<var>⁠ Optional. Columns to plot as a vector of unquoted names.

bins

⁠<int>⁠ Number of bins.

nsub

⁠<lgl>⁠ Show number of observations.

...

Additional arguments for ggplot2::geom_histogram.

Value

A ggplot object.

Examples

iris |> gghist()
iris |> gghist(c(Sepal.Width,Sepal.Length))

edar documentation built on Nov. 15, 2026, 1:07 a.m.