I have a symmetric matrix `s` defined as:

```
s<-matrix(1:25,5)
s[lower.tri(s)] = t(s)[lower.tri(s)]
dimnames(s) <- list(LETTERS[1:5], LETTERS[1:5])
s

   A  B  C  D  E
A  1  6 11 16 21
B  6  7 12 17 22
C 11 12 13 18 23
D 16 17 18 19 24
E 21 22 23 24 25

```

In addition, there is a vector `t` defined as:

```
t <- seq(1,10)
names(t) <- c('C_A', 'E_A', 'E_B', 'E_C', 'E_D', 'D_A', 'D_B', 'D_C', 'C_B', 'A_B')

```

Now I would like to add the elements of `t` to the upper and lower triangular elements of `s` in such a way that the element of `t` with the name 'C\_A' is added to the elements of `s` with row and column names of 'C' and 'A' (or 'A' and 'C'), the element of `t` with the name 'E\_A' is added to the elements of `s` with row and column names of 'E' and 'A' (or 'A' and 'E'), etc. For example, both s['A','B'] and s['B','A'] should be added by t['A\_B'], and similarly for all other off-diagonal elements. Do nothing for the diagonals.

What is an elegant way to achieve this?