segment function

Segment data into change points