I have an adjacency matrix of 0s and 1s that indicate tie nominations. Some nominations are not reciprocated, so the matrix is asymmetrical.
I would like to recode the cell values from 1 to 0 if they do not have a symmetrical match.
Sample small matrix:
[,1] [,2] [,3] [,4]
[1,] 0 1 0 1
[2,] 0 0 1 0
[3,] 0 0 0 1
[4,] 1 0 1 0
Output desired:
[,1] [,2] [,3] [,4]
[1,] 0 0 0 1
[2,] 0 0 0 0
[3,] 0 0 0 1
[4,] 1 0 1 0