vec2range: Convert a vector of integers in to a matrix of ranges

View source: R/vec2range.R

vec2rangeR Documentation

Convert a vector of integers in to a matrix of ranges

Description

A function which converts a one-dimensional vector into a 2-column matrix of pairwise ranges that represent the range of numbers between subsequent values

Usage

vec2range(vec, with.max = NULL)

Arguments

vec

A vector of integers

with.max

(optional) A number to use as the end point of the last range

Value

matrix whose rows contain start-end pairs from original vector


stackcon/rngt documentation built on June 17, 2022, 5:29 p.m.