Create a timeseries profile

ts_integrate(y)

Arguments

y

A 1D timeseries

Value

The profile calculated as cumsum(y[-length(y)]*diff(t)), with t as stats::time(y)

Examples

y <- runif(1000,-3,3)
plot(ts(y))

y_i <- ts_integrate(y)
plot(ts(y_i))