> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Joshua Wiley
> Sent: Friday, October 15, 2010 12:23 AM
> To: Gregor
> Cc: r-help@r-project.org
> Subject: Re: [R] fast rowCumsums wanted for calculating the
Although I know there is another message in this thread I am replying
to this message to be able to include the whole discussion to this
point.
Gregor mentioned the possibility of extending the compiled code for
cumsum so that it would handle the matrix case. The work by Dirk
Eddelbuettel and Rom
On Fri, Oct 15, 2010 at 12:23 AM, Joshua Wiley wrote:
>
> Hi,
>
> You might look at Reduce(). It seems faster. I converted the matrix
> to a list in an incredibly sloppy way (which you should not emulate)
> because I cannot think of the simple way.
Dennis provided the answer: system.time(add(
Hi,
You might look at Reduce(). It seems faster. I converted the matrix
to a list in an incredibly sloppy way (which you should not emulate)
because I cannot think of the simple way.
> probs <- t(matrix(rep(1:1000), nrow=10)) # matrix with row-wise
> probabilites
> F <- matrix(0, nrow=nro
Dear all,
Maybe the "easiest" solution: Is there anything that speaks against generalizing
cumsum from base to cope with matrices (as is done in matlab)? E.g.:
"cumsum(Matrix, 1)"
equivalent to
"apply(Matrix, 1, cumsum)"
The main advantage could be optimized code if the Matrix is extreme nonsqua
5 matches
Mail list logo