Skip to content
Prev 278561 / 398503 Next

cumsum in 3d arrays

On Nov 26, 2011, at 9:32 AM, zloncaric wrote:

            
`apply` lets you chose which dimension gets selected.

Perhaps:

apply(mat, 3, cumsum)

(This is pretty basic stuff so you should probably be reading or at  
least skimming somewhat more thoroughly than you have so far the  
Introduction to R document and there is also the R for Matlab document  
by Bob Muenchen ... and a compendium of equivalencies by Hiebeler at: www.math.umaine.edu/~hiebeler/comp/matlabR.html 
  )