[R] Running sum

hadley wickham h.wickham at gmail.com
Sat Nov 20 18:20:06 CET 2004

> Perhaps I'm missing something, but isn't the maximum of the cumulative
> sum simply the last value, ie. sum(x)?

As many have mentioned, I was forgetting the negative numbers.  Thanks
to those who pointed that out.


More information about the R-help mailing list