R - How to make 2 adjacency matrices compatible to eachother
问题 I have 2 adjacency matrices with different dimesnsions. I want to make their dimensions compatible so that when I replace any column of one matrix from any column of second matrix then I don't get the following error message: Error: number of items to replace is not a multiple of replacement length Here are my matrices: > mat1 Tommy Roy Addy Sam Tommy 0 1 0 -1 Roy -1 -1 1 0 Addy 1 0 -1 0 Sam 0 0 -1 1 > mat2 Mike Roy Addy Sam Dan Mike 0 1 0 -1 0 Roy -1 -1 1 0 1 Addy 1 0 -1 0 -1 Sam 0 0 -1 1 0