For each index in a vector, computes the maximum of the vector from the beginning of the vector up to the current index
A numeric or integer vector
In the sequence x, x, ..., x[n],
returns the vector y such that for each i = 1,...,n,
y[i] = max(x[j]; j = 1,...,i)
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.