Learn R Programming

IntervalSurgeon (version 1.3)

sections: 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)

Value

Intervals represented by integer matrix of two columns.

Arguments

x

Sorted integer vector.

Examples

Run this code
sections(1:10)

Run the code above in your browser using DataLab