gghistogram: Plot a histogram

Description Usage Arguments Value Examples

View source: R/gghistogram.R

Description

Plot a histogram

Usage

1
gghistogram(data, variable, mapping = NULL, ...)

Arguments

data

A data frame

variable

Name of the variable to plot

mapping

A named list of arguments to ggplot2::aes_string, containing additional mappings

...

Parameters to be passed to ggplot2::geom_histogram

Value

A ggplot

A ggplot

Examples

1
2
3
mtcars$vs <- factor(mtcars$vs)
gghistogram(mtcars, "mpg")
gghistogram(mtcars, "mpg", mapping = list(fill = "vs"), alpha = 0.5)

rscherrer/ggsim documentation built on June 11, 2020, 2:22 p.m.