find_breaks: Breakpoints to be passed to a Histogram

Description Usage Arguments Value See Also

View source: R/find_breaks.R

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

1
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.


statip documentation built on Nov. 18, 2019, 1:06 a.m.