Multiple changepoint detection
example.R shows two examples. The first is a times series with 2 changepoints, and the second is a times series with 1 changepoints. This algorithm can differentiate them pretty accurately.
amtc.R is an algorithm designed to detect changepoints from time series with at most two changepoints.
Please refer to Introduction to ATMC Algorithm.pdf
for details.