symmIndex2vectorIndex: Array: make vector positions from symmetric array index

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/array.R

Description

make vector positions from (non-symmetric) array index respecting dim and fixdiag

Usage

1

Arguments

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

Details

With fixdiag = NULL

Value

a vector of indices in 1:prod(dim(x))

Author(s)

Jens Oehlschl<c3><a4>gel

See Also

arrayIndex2vectorIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  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)

kindlychung/ff documentation built on May 20, 2019, 9:58 a.m.