[R] Statemement by recurrence avoiding loop

tlorino@vet-alfort.fr tlorino at vet-alfort.fr
Mon Jul 8 09:47:10 CEST 2002


Dear R users,

I would like to calculate a cumulative sum as following: on the i-th row, in the
j-th column of a matrix, I would like to obtain the sum of the (i-1) preceding elements of
this j-th column.
Could I avoid a "for" loop?

Thank you,
Tristan Lorino

---------------------- 
École Nationale Vétérinaire d'Alfort - http://www.vet-alfort.fr,
Tél. 01 43 96 70 33
Mél. tlorino at vet-alfort.fr
Site personnel : http://daedale.free.fr

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list