mergeIntervals.numeric
From R.utils v1.12.0
by Henrik Bengtsson
Merges intervals
Merges intervals by returning an index vector
specifying the (first)
interval that each value maps to, if any.
- Keywords
- methods, utilities, programming
Usage
## S3 method for class 'numeric':
mergeIntervals(intervals, ...)
Arguments
Details
The upper and lower bounds are considered to be inclusive, that is, all intervals are interpreted to be of form [a,b]. There is currently no way to specify intervals with open bounds, e.g. (a,b]. Furthermore, the bounds are currently treated as real values. For instance, merging [0,1] and [2,3] will return the same intervals. Note, if integer intervals were treated specially, we would merge these intervals to integer interval [0,3] == {0,1,2,3}.
Value
See Also
inAnyInterval
().
match
().
Community examples
Looks like there are no examples yet.