Description Usage Arguments Value Author(s) Examples
For each index in a vector, computes the maximum of the vector from the beginning of the vector up to the current index
1 | cumMax(x)
|
x |
A numeric or integer vector |
In the sequence x[1], x[2], ..., x[n], cumMax
returns the vector y such that for each i = 1,...,n,
y[i] = max(x[j]; j = 1,...,i)
Landon Sego
1 2 3 |
[1] 1 2 3 4 5 6 7 8 9 10
[1] 1 3 4 5 5 5 5 5 7 8 8 8
[1] 1.522529 3.289682 4.417396 5.824995 5.824995 5.824995 5.824995 5.824995
[9] 7.132516 8.049854 8.734988 8.734988
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.