Construction of an edgelist from a sociomatrix
sm2el(sm,directed=TRUE)
sm | a sociomatrix with possibly valued relations |
---|---|
directed | if TRUE, only use the upper triangular part of the matrix to enumerate edges |
an edglist
Peter Hoff
#> 1 2 3 4 5 6 7 8 9 10 #> 1 NA 0 0 0 0 0 0 0 0 0 #> 2 0 NA 0 0 0 0 0 0 0 0 #> 3 0 0 NA 0 0 0 0 0 0 0 #> 4 0 0 0 NA 0 0 0 0 0 0 #> 5 0 0 0 0 NA 0 0 0 0 0 #> 6 0 0 0 0 0 NA 0 0 0 0 #> 7 0 0 0 0 0 0 NA 0 0 0 #> 8 0 0 0 0 0 0 0 NA 0 0 #> 9 0 0 0 0 0 0 0 0 NA 0 #> 10 0 0 0 0 0 0 0 0 0 NA