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 |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.