Efficient binary search for character vectors

Share:

Description

Efficient binary search for character vectors

Usage

1
bsearch7(val, tab, L = 1L, H = length(tab))

Arguments

val

values

tab

table to find values in

L

lower bound

H

upper bound

Author(s)

Martin Morgan, Neal Fultz

References

http://stackoverflow.com/questions/20133344/find-closest-value-in-a-vector-with-binary-search/ and https://stat.ethz.ch/pipermail/r-help/2011-April/274182.html

Examples

1