R/utils.R
igraph_to_networkD3.RdFunction to convert igraph graph to a list suitable for networkD3
igraph_to_networkD3(g, group, what = "both")an igraph class graph object
an object that contains node group values, for example, those
created with igraph's membership function.
a character string specifying what to return. If
what = 'links' or what = 'nodes' only the links or nodes are
returned as data frames, respectively. If what = 'both' then both
data frames will be return in a list.
A list of link and node data frames or only the link or node data frames.