binning_search: Finding which bin each element of a vector belongs to.

Description Usage Arguments Value Examples

View source: R/binning_search.R

Description

This function determines which bin each element of belongs to based on the lower bound and upper bound of each bin. The range of the ith bin is (start[i],end[i]].

Of limited interest to most users; function binning_search() would typically be called by some other functions.

Usage

1

Arguments

v

A vector of numbers.

start

lower bound of each bin

end

upper bound of each bin

Value

A vector with length length(v), giving which bin each element of v belongs to.

Examples

1
binning_search(1:10,c(0,5),c(5,10))

lakerwsl/WUNT documentation built on Sept. 13, 2020, 12:15 a.m.