Hi ManInMoon,
Perhaps the following apply(yourmatrix, 2, cumsum, na.rm = TRUE) ? See
?cumsum and ?apply for more information.
HTH,
Jorge
On Thu, Mar 18, 2010 at 10:01 AM, ManInMoon <> wrote:
>
> IIs there an equivalent of cumsum for a matrix? i.e cumsum is applied to
> each
> column ?
>
>
> --
> View this message in context:
> http://n4.nabble.com/cumsum-for-matrix-tp1597985p1597985.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]