# NOT RUN {
## 1: run dpseg with store.matrix=TRUE to allow re-rung
segs <- dpseg(x=oddata$Time, y=log(oddata$A3), store.matrix=TRUE)
## 2: run dpseg with score function matrix input
segr <- dpseg(y=segs$SCR, P=0.0001, verb=1)
## NOTE: only data indices i and j are provided in results
print(segr)
## 3: add original data and linear regression for segments
## NOTE: now also plot and predict methods work
segr <- addLm(segr, x=oddata$Time, y=log(oddata$A3))
print(segr)
# }
Run the code above in your browser using DataLab