Merge two neighboring segments into one segment, which is done by dropping their common change point and recalculating the segment statistics.
# S3 method for AbstractCBS
mergeTwoSegments(...)
An integer
specifying the segments (left, left+1)
to be merged.
If TRUE
, segment statistics are updated.
Not used.
Returns an AbstractCBS
of the same class with one less segment.
To merge a segment and its two flanking segments, see
*mergeThreeSegments()
.
To drop regions (a connected set of segments)
see *dropRegions()
.
For more information see AbstractCBS
.