flatten: Flatten a set of intervals

Description Usage Arguments Value Examples

View source: R/functions.R

Description

For a given set of intervals compute the set of intervals where there is overlap with at least one from the given. The resulting intervals are sorted and detached.

Usage

1

Arguments

x

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

Value

Intervals represented by integer matrix of two columns.

Examples

1
flatten(rbind(c(1, 3), c(2, 4), c(5, 6)))

IntervalSurgeon documentation built on June 16, 2018, 1:36 p.m.