depth: Depth of piled intervals

View source: R/functions.R

depthR Documentation

Depth of piled intervals

Description

Get the depth of piled intervals for each section in the sections of x (see sections).

Usage

depth(x, include_intervals = FALSE)

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.

include_intervals

Logical value determining whether the function should return a vector of depths at each ‘section’ in the range of x (see sections), or a list with properties intervals and depths specifying the intervals of the sections and the corresponding depths respectively.

Value

Integer vector giving depth of piled intervals from x (within each sub-interval) or list containing a property "intervals", a matrix of sections, and property "depths", giving the corresponding pile depths.

Examples

depth(cbind(1:10, 11:20))

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