| isWithinInterval {tilingArray} | R Documentation |
Test whether a vector of numbers is within a vector of intervals
isWithinInterval(x, start, end)
x |
Numeric vector. |
start |
Numeric vector. |
end |
Numeric vector of same length as start. |
For each value x[i], this function tests whether it lies
within the interval from start[j] to end[j],
i.e. whether start[j] <= x[i] <= end[j]. The result is
returned in a logical matrix whose rows correspond to i
and columns to j.
The implementation of this function is naive. It does not use loops
within R, but can have a large
memory consumption, corresponding to several matrices of size
length(x)*length(start)
Matrix of size length(x)*length(start).
W. Huber <huber@ebi.ac.uk>
x = 1:8 start = seq(2, 6, by=2) end = seq(4, 8, by=2) isWithinInterval(x, start, end)