grapes-In-grapes: Find if value belongs to a set of intervals

Description Usage Arguments Value Author(s) Examples

Description

Wrapper around distance_to_nearest from the Intervals package.

Usage

1
x %In% Intv

Arguments

x

a set of numeric values

Intv

a set of intervals, defined by a two-column matrix of endpoints or an Intervals object

Value

a vector of logicals, which are true if x[i] belongs to any of the intervals in the set.

Author(s)

Simon Barthelme

Examples

1
2
3
4
start <- c(0,1,2)
end <- c(.5,1.3,3)
intv <- cbind(start,end) #The first interval is 0-0.5, second is 1-1.3, etc. 
c(0,.6,1.5,3) %In% intv

dahtah/eyelinker documentation built on May 14, 2019, 3:25 p.m.