## Two changepoints within \code{buffer} points:
set.seed(5)
y <- c(rnorm(15,0.5,0.01),0.505,0.51,0.015,0.52,rnorm(15,0.6,0.05))
res <- offlineCPD(y)
plot(res,buffer=10) ## Will replace the two changepoints
plot(res,cleanCP=FALSE) ## Will not replace the changepoints
## A changepoint is forgotten:
set.seed(5)
y <- c(rnorm(50,0.5,0.1),rnorm(20,0.48,0.02),rnorm(50,0.5,0.1),rnorm(75,0.7,0.4))
res <- offlineCPD(y)
plot(res) ## Will remove the changepoint that has been second-guessed
plot(res,cleanCP=FALSE) ## Will not remove the changepoint
Run the code above in your browser using DataLab