# Example: clustering data generated from a Gaussian
# mixture model of two components
x <- c(rnorm(15, mean=-1, sd=0.3),
rnorm(15, mean=1, sd=0.3))
y <- x^3
res <- Cksegs.1d.dp(y, x=x)
print(res, lwd=2)
Run the code above in your browser using DataLab