Learn R Programming

pvar (version 2.2.7)

ChangePoints: Change Points of a numeric vector

Description

Finds changes points (i.e. corners) in the numeric vector.

Usage

ChangePoints(x)

Value

The vector of index of change points.

Arguments

x

numeric vector.

Details

The end points of the vector will be always included in the results.

Examples

Run this code
x <- rwiener(100)
cid <- ChangePoints(x)
plot(x, type="l")
points(time(x)[cid], x[cid], cex=0.5, col=2, pch=19)

Run the code above in your browser using DataLab