[R] Generalized cumsum?

David Winsemius dwinsemius at comcast.net
Wed Sep 16 23:17:10 CEST 2009


On Sep 16, 2009, at 5:09 PM, OKB (not okblacke) wrote:

> baptiste auguie wrote:
>
>> ?Reduce
>>
>> maybe
>
>    	No, Reduce reduces an entire vector to a single value by  
> repeatedly
> combining adjacent elements.  I'm looking to convert a vector to  
> another
> vector where each element is some arbitrary aggregating function  
> applied
> to the first n elements of the vector.

Yes. You need to look again:

accumulate=FALSE by default, but is subject to change.-

-- 

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list