# Number of users connected to the Internet through a server every minute
ts <- datasets::WWWusage[1:80]
# Calculate CoA
ts_CoA <- CoA(ts)
# Plot
plot(ts, ty = "l", xlab = "Time", ylab = "Number of users")
graphics::abline(v = ts_CoA, lwd = 2, lty = 2)
Run the code above in your browser using DataLab