mapToIntervals.numeric
From R.utils v1.7.0
by Henrik Bengtsson
Maps values to intervals
Maps values to 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':
mapToIntervals(x, intervals, includeLower=TRUE, includeUpper=TRUE, ...)
Arguments
- x
- A
numeric
vector
of K values to be matched. - intervals
- The N intervals to be matched against.
If an Nx2
numeric
matrix
, the first column should be the lower bounds and the second column the u - includeLower, includeUpper
- If
TRUE
, the lower (upper) bound of each interval is included in the test, otherwise not. - ...
- Not used.
Value
See Also
inAnyInterval
().
match
().
findInterval
().
cut
().
Community examples
Looks like there are no examples yet.