bin_equal_value: bin equal value

Description Usage Arguments Value

View source: R/bin_equal_value.R

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

1
bin_equal_value(mdb, col, n_bins = 10)

Arguments

mdb

dataframe

col

a numeric vector

n_bins

number of bins

Value

an integer vector


tidybins documentation built on Oct. 14, 2021, 5:22 p.m.