twa | R Documentation |
The moving average is built only using the values in the past, so the earliest possible time for the maximum in the time series returned is after one window has passed.
twa(x, window = 21)
## S3 method for class 'one_box'
twa(x, window = 21)
x |
An object of type |
window |
The size of the moving window |
max_twa
pred <- sawtooth(one_box(10),
applications = data.frame(time = c(0, 7), amount = c(1, 1)))
max_twa(pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.