-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
60 lines (45 loc) · 2.15 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
output:
github_document:
html_preview: true
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# histogramr <img src="man/figures/logo.png" align="right" width="232" height="100" />
<!-- badges: start -->
[![Build Status](https://travis-ci.org/JonasMoss/histogramr.svg?branch=master)](https://travis-ci.org/JonasMoss/histogramr)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/JonasMoss/histogramr?branch=master&svg=true)](https://ci.appveyor.com/project/JonasMoss/histogramr)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/histogramr)](https://cran.r-project.org/package=histogramr)
[![Coverage Status](https://codecov.io/gh/JonasMoss/histogramr/branch/master/graph/badge.svg)](https://codecov.io/gh/JonasMoss/histogramr?branch=master)
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
<!-- badges: end -->
This is an `R` package for estimating [irregular histograms](https://en.wikipedia.org/wiki/Histogram#Variable_bin_widths). 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 L<sub>2</sub> minimization.
*Note:* This package is under development. The API and core features are likely
to change. Still, it passes the CRAN checks `histogramr` plots histograms, so
use if you really want to.
## Installation
Install the development from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("JonasMoss/histogramr")
```
## Example Usage
Only data on the unit interval [0, 1] is supported.
```{r example}
library("histogramr")
histogramr(USArrests$Rape/100, breaks = 7)
rug(USArrests$Rape/100)
```