Skip to content

JonasMoss/histogramr

Repository files navigation

histogramr

Build Status AppVeyor Build Status CRAN_Status_Badge Coverage Status Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

This is an R package for estimating irregular histograms. The intention is to:

  1. Implement some methods for selecting bin placement,
  2. Make the interface mimic stats::hist as closely as possible.

Currently the package estimates the optimal bin placements of irregular histograms (given the number of break points) using either maximum likelihood or L2 minimization.

Note: This package is under development. The API and core features are likely to change.

Installation

Install the development from GitHub with:

# install.packages("devtools")
devtools::install_github("JonasMoss/histogramr")

Example Usage

Only data on the unit interval [0, 1] is supported.

library("histogramr")
histogramr(USArrests$Rape/100, breaks = 7)
rug(USArrests$Rape/100)