[R] Running sum

Kjetil Brinchmann Halvorsen kjetil at acelerate.com
Sat Nov 20 01:00:06 CET 2004


Marc Schwartz wrote:

>On Fri, 2004-11-19 at 16:44 -0600, hadley wickham wrote:
>  
>
>>Perhaps I'm missing something, but isn't the maximum of the cumulative
>>sum simply the last value, ie. sum(x)?
>>
>>Hadley
>>    
>>
>
>
>Indeed!
>
>And...going back to Sean's original post he did write:
>
>"I just need max(Y)."
>
>Thus, a whole group of us (independently) managed to over-engineer the
>  
>
Please, Please, please, ... was it ever said that the numbers was only 
positive?

Kjetil

>solution. 
>
>Presuming of course, that Sean does not require the entire cumulative
>sum vector for other purposes.
>
>I wonder what that says about human cognition....
>
>Thanks,
>
>Marc
><Cleaning his bi-focals...>
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
>  
>


-- 

Kjetil Halvorsen.

Peace is the most effective weapon of mass construction.
               --  Mahdi Elmandjra




More information about the R-help mailing list