mat.to.edgl: Matrix to edge list
Description
Converts a square adjacency matrix into a data frame with three columns representing an edge list. Columns are: actor, receiver and weight.
Usage
mat.to.edgl(M, sym = FALSE, erase.diag = TRUE)
Arguments
M
a square adjacency matrix.
sym
if TRUE, it extracts the lower triangle of the matrix only.
erase.diag
if TRUE, it omits diagonals.
Value
a data frame representing an edge list.
Details
This function convert a matrix into an edgelist.