Description Usage Arguments Value Author(s) See Also Examples
This utility function is a replacement for findIntervals that works even when the set of intervals is discontinuous. It wraps "which_nearest" from the intervals package.
1 | whichInterval(x, Intv)
|
x |
a set of numeric values |
Intv |
a two-column matrix or an object of class Intervals |
for each value in x: if x[i] in in the set of intervals, the index of the corresponding interval(s), NA if no interval contains x[i]
Simon Barthelme
'
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.