breaks {exams.forge}R Documentation

Breaks

Description

Creates a number of equidistant or non-equidistant breaks for given data x. If width is not given then it will be set to diff(pretty(x))[1]. probs can either be a single integer, giving the number of quantiles, or a vector of probabilities with values in [0,1]. Please note that if width is too large, then using probs may result in equidistant breaks too.

Usage

breaks(x, width = NULL, probs = NULL)

add_breaks(x, width = NULL, probs = NULL)

dbreaks(x, width = NULL, probs = NULL)

Arguments

x

numeric: data

width

numeric: class width (default: NULL)

probs

numeric: number of non-equidistant classes (default: NULL)

Value

A numeric vector of breaks.

Examples

x <- rnorm(100, mean=1.8, sd=0.1)
breaks(x)
breaks(x, 0.1)
breaks(x, 0.1, probs=4)

[Package exams.forge version 1.0.10 Index]