histbreaks {exams.forge} | R Documentation |
Histogram Breakpoints
Description
Randomly selects size
breakpoints from breaks
. If outer
is TRUE
, then
the first and last element of breaks
is always included into the returned break points.
If size
is a vector, the number of breakpoints is first sampled from size
.
Usage
histbreaks(breaks, size, outer = TRUE, ...)
rand_breaks(breaks, size, outer = TRUE, ...)
dhistbreaks(breaks, size, outer = TRUE, ...)
Arguments
breaks |
numeric: a vector of possible break points |
size |
integer: number of break points |
outer |
logical: should be the first and last element of the included breaks (default: |
... |
further parameters given if sampling of |
Value
A vector of breakpoints.
Examples
# Always includes 100 and 200
histbreaks(seq(100, 200, by=10), 4)
# Always includes 100 and 200 and chooses randomly between 3 to 5 break points
histbreaks(seq(100, 200, by=10), 3:5)
# May not include 100 and 200
histbreaks(seq(100, 200, by=10), 4, outer=FALSE)
[Package exams.forge version 1.0.10 Index]