Description Usage Arguments Value Examples
Find a value in a list using binary search Wrapper for bin_search_rec
1 | bin_search(l, val, start = NULL, end = NULL)
|
l |
A list of values |
val |
A value that is looked for |
Postition - 1 at which val
must be in inserted to keep l
sorted. 0
if val
is
smaller than the first element of l
, length(l)
if it is greater than the last one
1 2 3 | bin_search(1:10, 2)
bin_search(1:10, 0)
bin_search(1:10, 2.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.