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)

Previous
Previous

Adding list names to data frames when using lapply and do.call

Next
Next

Code snippet for odds ratio CIs in R