Camarda, Carlo Giovanni wrote:
> Dear R-users,
>
> is there any way to sum up the elements of the "diagonals" of a matrix
> without using a for-loop? While there is a simple way over rows and
> columns, I don't see a straightforward multiplication for the diagonals,
> am I too demanding? Or, more l
gt; [mailto:[EMAIL PROTECTED] On Behalf Of Camarda,
> Carlo Giovanni
> Sent: Tuesday, February 26, 2008 1:32 PM
> To: [EMAIL PROTECTED]
> Subject: [R] Summing up diagonals w/o for-loop
>
> Dear R-users,
>
> is there any way to sum up the elements of the "diagonals" of
Dear R-users,
is there any way to sum up the elements of the "diagonals" of a matrix
without using a for-loop? While there is a simple way over rows and
columns, I don't see a straightforward multiplication for the diagonals,
am I too demanding? Or, more likely, I'm lack some algebra trick? Is
the
3 matches
Mail list logo