BASIX.find.interval: Positions of elements in a defined region
Description
This function returns the positions of elements which are in a defined region.
Usage
BASIX.find.interval(vec,from,to,start=1)
Arguments
vec
base vector
from
left side
to
right side
start
the start position
Details
The function returns the position of the elements in vector vec,
which are in a specific interval, defined by from and to,
starting from position start.
The native R solution would be:
X <- (vec >= from) & (vec <= to) ids <- which(X)
or the function findInterval(), which
is just a little bit slower than
BASIX.interval