Learn R Programming

icmstate (version 0.2.0)

AsubsetB: Check if closed interval is contained in other closed interval

Description

Function which takes as input two matrices with 2 columns each and checks whether each interval in the first matrix is contained within each interval in the second matrix.

Usage

AsubsetB(A, B, B.left.open = FALSE, B.right.open = FALSE)

Value

Matrix of size (nrow(A) * nrow(B)) with binary values indicating whether the intervals in A are contained in B

Arguments

A

Two column matrix containing intervals to be checked for being contained in B

B

Two column matrix containing intervals possibly overlapping the intervals in A

B.left.open

Are the intervals in B left-open?

B.right.open

Are the intervals in B right-open?