How can id do this efficiently in R ?

1 0 0
0 2 0
0 0 3


rotate right
0 0 1
0 2 0
3 0 0
rotate left
0 0 3
0 2 0
1 0 0

What I want to do is described here:
http://stackoverflow.com/questions/13049575/r-min-max-and-mean-of-off-diagonal-elements-in-a-matrix

but I want do to it for all off-anti-diagonals.

I am also concerned that the method described on stackoverflow isn't
necessarily efficient.
I work with matrices of size 3k * 3k.


--
Witold Eryk Wolski

______________________________________________
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.

Reply via email to