SegAnnot calculates the least squares segmentation for piecewise constant annotated noisy signals.
The SegAnnot package implements a dynamic programming algorithm for annotation-aware segmentation. Install the package and read the vignette to find out why this algorithm is useful, and how it works.
install.packages("SegAnnot",repos="http://r-forge.r-project.org") vignette("SegAnnot",package="SegAnnot")
The project summary page you can find here.