Learn R Programming

icmstate (version 0.2.0)

Aintersectb: Check if half-open intervals intersect with event times

Description

Function which takes as input a 2 column matrix of half-open intervals and a vector of event times and returns the event times that intersect with the half-open intervals.

Usage

Aintersectb(A, b, A.left.open = FALSE)

Value

Numeric vector of event times from b that intersect with A.

Arguments

A

Two column matrix containing intervals

b

Vector of event times

A.left.open

Are the intervals in A open on the left side? Default = FALSE.