SciencesPo (version 1.3.8)

sturges: Calculate breaks

Calculate breaks according to the Herbert Sturges' (1926) formula

Description

Calculate breaks

Calculate breaks according to the Herbert Sturges' (1926) formula

Usage

sturges(x)

Arguments

x
A vector of count values.

encoding

UTF-8

References

Sturges, H. (1926) The choice of a class-interval. J. Amer. Statist. Assoc., 21, 65-66.

Examples

Run this code
set.seed(51)
y <- sample(100)
sturges(y)

Run the code above in your browser using DataLab