vbin | R Documentation |
Bin a vector into 'n' intervals in regard with its value range. The vector x is split into n bins within [min(x), max(x)], and bin index is given by checking the bin [bin_min, bin_max) into which data points in x fall.
vbin(x, n, center=c(TRUE, FALSE))
x |
a numeric vector |
n |
the number of bins |
center |
indication of representing intervals as index (default) or center points. |
Sequence with interval index or center points.
seq_approximate
, vbin.range
, vbin.grid
vbin(1:10, 3) vbin(1:10, 3, TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.