Learn R Programming

xhmmScripts (version 1.1)

calcSegmentIntervals: Determine all of the indices where a transition in value occurs.

Description

Determine all of the vector indices where a transition in value occurs along the input vector.

Usage

calcSegmentIntervals(valuesVectorList)

Arguments

valuesVectorList

Examples

Run this code
ints = c(rep(1, 100), rep(2, 200), rep(3, 300))
breaks = calcSegmentIntervals(list(ints))

Run the code above in your browser using DataLab