join: Get all overlapping tuples of intervals from multiple sets

View source: R/functions.R

joinR Documentation

Get all overlapping tuples of intervals from multiple sets

Description

Get matrix specifying overlapping tuples of intervals from multiple sets. Each row specifies an overlapping tuple. The nth element in a row contains the row index of the interval in the nth set of intervals passed to the function. Depending on the value of the output argument, there may two additional columns giving the start and end coordinates of the overlap (the default: output="intervals", no extra columns (output="indices") or one additional column giving the row index of the 'section' of the complete set of intervals (output="sections", see sections).

Usage

join(..., output = "intervals")

Arguments

...

Integer matrices of two columns, the first column giving the (inclusive) start points of intervals and the second column giving the corresponding (exclusive) end points.

output

Character value, one of "intervals", "indices" and "sections".

Value

Integer matrix.

Examples

join(rbind(c(1, 100), c(50, 100)), rbind(c(1, 2), c(49, 51), c(50, 200)))

IntervalSurgeon documentation built on April 15, 2023, 5:07 p.m.