knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

dbox

Lifecycle: experimental CRAN status Travis build status

dbox is a package for visualizing continuous distributions with a combined kernel density plot and box plot. This allows for a simultaneous view of overall distribution shape in the density plot as well as important quantiles and extreme values in the box plot. Box plot outliers are jittered to improve outliers density visualization. An optional density plot of an idealized normal distribution with the same parameters is also available for comparison.

Installation

You can install dbox with: devtools::install_github('hwkmth/dbox') and use help(dbox) for more information.

Examples

library(dbox)

ndensity <- rnorm(5000)
dbox(ndensity)

rskew <- 1.5^rnorm(5000) * 5
dbox(rskew, color = "orange2", fill = FALSE,
     normal = TRUE, color_norm = "steelblue2")

diamonds <- ggplot2::diamonds
diamonds$lprice <- log(diamonds$price)
dbox(diamonds$lprice[diamonds$cut == "Ideal"],
     label = "Log Price: Ideal Cut Diamonds",
     color = "orange2",
     normal = TRUE,
     color_norm = "steelblue2")


hwkmth/dbox documentation built on July 10, 2019, 3:11 a.m.