sections: Get the sections from a set of interval breaks

View source: R/functions.R

sectionsR Documentation

Get the sections from a set of interval breaks

Description

Given a set of interval breaks (see breaks), generate a new set of intervals, the ‘sections’, which partitions the full range of the given set, with an interval between every ‘break’ (i.e. start/end point) in the given set.

Usage

sections(x)

Arguments

x

Sorted integer vector.

Value

Intervals represented by integer matrix of two columns.

Examples

sections(1:10)

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