ggnice_hist: Plot histogram with some additional statistics using ggplot2

View source: R/ggfuns.R

ggnice_histR Documentation

Plot histogram with some additional statistics using ggplot2

Description

Plot histogram with some additional statistics using ggplot2. Ported from the OurTools package written by Dirk Hasenclever.

Usage

ggnice_hist(
  data,
  x,
  x_lab = NULL,
  x_breaks = NULL,
  title = NULL,
  vline = NULL,
  digits = 1,
  scale = scales::identity_trans()
)

Arguments

data

data.frame

x

numeric variable (part of data)

x_lab

Label for x-axis (character)

title

Plot title (character)

vline

x-intercept for vertical line (numeric)

digits

Number of digits (numeric)

scale

Scale transformation (character); defaults to "identity" (no transformation)

Examples

## Not run: 
ggnice_hist(data = mtcars, 
             x = hp, 
             x_lab = 'Gross horsepower',
             title = 'mtcars: Gross horsepower',
             scale = 'identity'

## End(Not run)

nrkoehler/xyzfuns documentation built on Nov. 12, 2024, 1:29 p.m.