plot.slopeOP: plot.slopeOP

Description Usage Arguments Value Examples

View source: R/slopeOP.R

Description

Plot the result of the slopeOP function and the data

Usage

1
2
## S3 method for class 'slopeOP'
plot(x, ..., data, chpt = NULL, states = NULL)

Arguments

x

a slopeOP class object

...

other parameters

data

the data from which we get the slopeOP object x

chpt

vector of changepoints of the model

states

vector of states of the model

Value

plot data and the inferred slopeOP result (and the model if specified in 'chpt' and 'states' parameters)

Examples

1
2
3
myData <- slopeData(index = c(1,100,200,300), states = c(0,5,3,6), noise = 2)
s <- slopeOP(data = myData, states = 0:6, penalty = 20)
plot(s, data = myData, chpt = c(1,100,200,300), states = c(0,5,3,6))

slopeOP documentation built on Jan. 13, 2021, 5:38 a.m.