indexToRange: Find contiguous ranges within a vector of indices

View source: R/plotDNA.R

indexToRangeR Documentation

Find contiguous ranges within a vector of indices

Description

Take a vector of indices and returns ranges of contiguous regions.

Usage

indexToRange(index)

Arguments

index

Indices to be condensed e.g. from which or grep

Value

A data frame with columns:

start:

Start of a contiguous region

end:

End of a contiguous region

Examples

indexToRange(c(1:10,11,14,16,17:20))

sherrillmix/dnaplotr documentation built on Oct. 29, 2022, 4:42 p.m.