Code snippet for edge list with igraph (R)
edge.list.vec <- as.vector(t(as.matrix(E))
where E is a data frame of two columns listing node pairs with edges between them. Edges can then be added with
g <- add.edges(g,edge.list.vec)
edge.list.vec <- as.vector(t(as.matrix(E))
where E is a data frame of two columns listing node pairs with edges between them. Edges can then be added with
g <- add.edges(g,edge.list.vec)