I am trying to get the weighted degree and unweighted degree distribution of a matrix with weighted edges in igraph. I used the graph.adjacency function such as
newMatrix<-graph.adjacency(matrix, weighted=NULL, mode="undirected", diag=FALSE)
But the weighted argument is not given me the result I expected. For a 3x3 matrix for example with the following values:
[,1][,2][,3]
[1,] 1 2 2
[2,] 2 2 0
[3,] 2 0 3
I would expect with the argument weighted=NULL and diag=FALSE an adjacency matrix such as:
[,1][,2][,3]
[1,] . 1 1
[2,] 1 . .
[3,] 1 . .
So the degree distribution for unweighted edges vector would be degree(2,1,1). Nevertheless the function is returning a weighted matrix. The returning adjacency matrix is:
[,1][,2][,3]
[1,] . 2 2
[2,] 2 . .
[3,] 2 . .
I have tried to change the weighted argument to TRUE and de modes to min, max... but the results always give me back a weighted matrix.