bin_equal_value {tidybins} | R Documentation |
bin equal value
Description
Bins a numeric column such that each bin contains 10 Intended for positive numeric vectors that make sense to sum, such as sales. Negative and NAs get treated as 0. The function never puts two rows with the same value into different bins. Accessed by the "value" method of the bin_cols function.
Usage
bin_equal_value(mdb, col, n_bins = 10)
Arguments
mdb |
dataframe |
col |
a numeric vector |
n_bins |
number of bins |
Value
an integer vector
[Package tidybins version 0.1.1 Index]