Maps adjacency matrix to edgelist

adj2el(adj, directed = TRUE)

Arguments

adj

matrix, the adjacency matrix

directed

boolean, is the graph directed?

Value

a dataframe containing the edgelist

Examples

data(contacts.adj)
#> Warning: data set ‘contacts.adj’ not found
el <- adj2el(contacts.adj)