Learn R Programming

exams.forge (version 1.0.10)

histwidth: Histogram Widths

Description

Creates a set of breaks and absolute frequencies in the range from 'from' to 'to'. The class widths are sampled from widths. The resulting numbers could be multiplied with an integer, if the sum(n) is too small. Additionally, it is checked whether the generated densities are terminating decimals.

Usage

histwidth(from, to, widths, dmax = 100)

width_breaks(from, to, widths, dmax = 100)

dhistwidth(from, to, widths, dmax = 100)

Value

A list with breaks, n's for each class and decimal if all densities are terminating decimals.

Arguments

from

numeric: start value

to

numeric: end value

widths

numeric: a vector of width to sample from

dmax

numeric: max. denominator value

Examples

Run this code
l <- histwidth(1.6, 2.1, widths=c(0.05, 0.1, 0.15, 0.2))
l
x <- histx(l$breaks, l$n)
histdata(x, l$breaks)

Run the code above in your browser using DataLab