histwidth: histwidth

View source: R/histwidth.R

histwidthR Documentation

histwidth

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 is checked if the densities generated are terminating decimals.

Usage

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

Arguments

from

numeric: start value

to

numeric: end value

widths

numeric: a vector of width to sample from

dmax

numeric: max. denominator value

Value

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

Examples

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)

sigbertklinke/exams2moodle documentation built on July 6, 2023, 3:26 p.m.