to_py_graph {motifr} | R Documentation |
Translate multi-level statnet or igraph network object to Python networkx object
Description
The function motifr::is.directed
is used to determine whether the
provided network is directed (if directed = FALSE
).
Usage
to_py_graph(g, lvl_attr, relabel = TRUE, directed = NULL)
Arguments
g |
statnet or igraph network object |
lvl_attr |
character vector specifying the attribute name where level
information is stored in |
relabel |
should nodes be relabelled with statnet |
directed |
whether the graph shall be treated as a directed graph. Per
default ( |
Details
The nodal attribute specified by lvl_attr
indicates the levels of the
nodes. Values are automatically converted to integers. Levels must be
numbered starting with 0, 1, ….
Value
Python networkx graph object
Examples
## Not run:
to_py_graph(motifr::dummy_net, lvl_attr = "sesType")
## End(Not run)
[Package motifr version 1.0.0 Index]