# Segment a time series using PELT
res <- segment_pelt(DataCPSim)
res
str(res)
# Segment as time series while specifying a penalty function
segment_pelt(DataCPSim, penalty = "BIC")
# Segment a time series while specifying a meanshift normal model
segment_pelt(DataCPSim, model_fn = fit_meanshift_norm, penalty = "BIC")
Run the code above in your browser using DataLab