symmIndex2vectorIndex | R Documentation |
make vector positions from (non-symmetric) array index respecting dim and fixdiag
symmIndex2vectorIndex(x, dim, fixdiag = NULL)
x |
a matrix[,1:2] with matrix subscripts |
dim |
the dimensions of the symmetric matrix |
fixdiag |
NULL assumes free diagonal, any value assumes fixed diagonal |
With fixdiag = NULL
a vector of indices in seq_len(prod(dim(x)))
Jens Oehlschlägel
arrayIndex2vectorIndex
symmIndex2vectorIndex(rbind(
c(1,1)
,c(1,10)
,c(10,1)
,c(10,10)
), dim=c(10,10))
symmIndex2vectorIndex(rbind(
c(1,1)
,c(1,10)
,c(10,1)
,c(10,10)
), dim=c(10,10), fixdiag=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.