| diag.off | R Documentation |
Returns broken diagonals of a magic square
diag.off(a, offset = 0, nw.se = TRUE)
a |
Square matrix |
offset |
vertical offset |
nw.se |
Boolean variable with |
Useful when testing for panmagic squares. The first element is always
the unbroken one (ie [1,1] to [n,n] if nw.se is
TRUE and [1,n] to [n,1] if nw.se is
FALSE.
Robin K. S. Hankin
is.panmagic
diag.off(magic(10),nw.se=FALSE,offset=0) diag.off(magic(10),nw.se=FALSE,offset=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.