powered by
Create a two-mode network from a data.frame
bipartite_from_data_frame(d, type1, type2, attr = NULL, weighted = TRUE)
two mode network as igraph object
data.frame
column name of mode 1
column name of mode 2
named list of edge attributes
should a weighted graph be created if multiple edges occur
David Schoch
library(igraph) edges <- data.frame(mode1 = 1:5, mode2 = letters[1:5]) bipartite_from_data_frame(edges, "mode1", "mode2")
Run the code above in your browser using DataLab