R: Breakpoints to be passed to a Histogram

find_breaks {statip} | R Documentation

## Breakpoints to be passed to a Histogram

### Description

The function `find_breaks()` isolates a piece of code of the function `truehist()` from package MASS that is used to compute the set of breakpoints to be applied for the construction of the histogram.

### Usage

    find_breaks(x, nbins = "Scott", h, x0 = -h/1000)

### Arguments

`x` | numeric. A vector.
`nbins` | integer or character. The suggested number of bins. Either a positive integer, or a character string naming a rule: `"Scott"` (the default) or `"Freedman-Diaconis"` or `"FD"`. (Case is ignored.)
`h` | numeric. The bin width, a strictly positive number (takes precedence over nbins).
`x0` | numeric. Shift for the bins - the breaks are at `x0 + h * (..., -1, 0, 1, ...)`.

### Value

A numeric vector.

### See Also

`histo()` in this package; `truehist()` from package MASS; `hist()` from package graphics.

[Package statip version 0.2.3 Index]