Helper to create models, which substitute in a symmetric matrix for a value.
Arguments
- m
The symmetric matrix
- x
Row position
- y
Column position
- val
Value to insert in the given position
Examples
m <- matrix(0, ncol = 3, nrow = 3)
subSymm(m, 1, 2, 1)
#> [,1] [,2] [,3]
#> [1,] 0 1 0
#> [2,] 1 0 0
#> [3,] 0 0 0