Description Usage Arguments Value Author(s) Examples
Find intervals by binary search
1 | binary_search(breaks, search, left_index = TRUE)
|
breaks |
a non-decreasing integer vector |
search |
an integer vector |
left_index |
whether to use the index of left break or right break |
A vector of index.
Zuguang Gu <z.gu@dkfz.de>
1 2 3 | site = c(2, 5, 9, 10, 15, 20)
binary_search(site, c(1, 5, 12, 30), FALSE)
binary_search(site, c(1, 5, 12, 30), TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.