Re: [R] cumsum in 3d arrays

2011-11-29 Thread zloncaric
Yes exactly what I want! Thank you very much for your help. -- View this message in context: http://r.789695.n4.nabble.com/cumsum-in-3d-arrays-tp4110470p4118432.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mail

Re: [R] cumsum in 3d arrays

2011-11-28 Thread William Dunlap
ge- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of zloncaric > Sent: Saturday, November 26, 2011 6:32 AM > To: r-help@r-project.org > Subject: [R] cumsum in 3d arrays > > Hello! > > Is it posible to apply /cumsum()/ along the

Re: [R] cumsum in 3d arrays

2011-11-28 Thread Dennis Murphy
Hi: Could you supply a small reproducible example with the output that you expect? For example, what output would you expect from the following: a <- array(1:24, c(2, 2, 3)) ? Dennis On Mon, Nov 28, 2011 at 12:32 AM, zloncaric wrote: > Thank you for your time and help. > > I'm quite aware that

Re: [R] cumsum in 3d arrays

2011-11-28 Thread zloncaric
Thank you for your time and help. I'm quite aware that this problem seems as basic stuff, and of course I've read several R and matlab manuals, and also consulted the D. Hiebeler, Matlab / R Reference and several others, but none of the suggested solutions seems to give me the right result. I've

Re: [R] cumsum in 3d arrays

2011-11-26 Thread David Winsemius
On Nov 26, 2011, at 11:24 AM, David Winsemius wrote: On Nov 26, 2011, at 9:32 AM, zloncaric wrote: Hello! Is it posible to apply /cumsum()/ along the 3rd dimension of 3D array? Something like matrlab function - /cumsum (*A*,dim)/ which returns the cumulative sum of the elements along th

Re: [R] cumsum in 3d arrays

2011-11-26 Thread David Winsemius
On Nov 26, 2011, at 9:32 AM, zloncaric wrote: Hello! Is it posible to apply /cumsum()/ along the 3rd dimension of 3D array? Something like matrlab function - /cumsum (*A*,dim)/ which returns the cumulative sum of the elements along the dimension of *A* specified by scalar dim. `apply` lets

Re: [R] cumsum in 3d arrays

2011-11-26 Thread Ben Bolker
zloncaric biologija.unios.hr> writes: > Is it posible to apply /cumsum()/ along the 3rd dimension of 3D array? > Something like matrlab function - /cumsum (*A*,dim)/ which returns the > cumulative sum of the elements along the dimension of *A* specified by > scalar dim. Check out the combinat

[R] cumsum in 3d arrays

2011-11-26 Thread zloncaric
Hello! Is it posible to apply /cumsum()/ along the 3rd dimension of 3D array? Something like matrlab function - /cumsum (*A*,dim)/ which returns the cumulative sum of the elements along the dimension of *A* specified by scalar dim. Thanks in advance Ċ½eljka -- View this message in context: