A generic and several implementations for binning vectors.
bin_vector(x, weight = NULL, ...)# S3 method for numeric
bin_vector(
x,
weight = NULL,
...,
width = 1,
origin = 0,
closed = c("right", "left"),
pad = FALSE
)
A vector to bin
If specified, an integer vector of the same length as x
representing the number of occurances of each value in x
additional arguments passed through to methods.
The width of a bin
The left-most value for bins.
One of "right"
or "left"
indicating whether
right or left edges of bins are included in the bin.
A logical indicating whether the bins should be padded to include an empty bin on each side.