to_py_graph: Translate multi-level statnet or igraph network object to...

Description Usage Arguments Details Value Examples

View source: R/core.R

Description

The function motifr::is.directed is used to determine whether the provided network is directed (if directed = FALSE).

Usage

1
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 net.

relabel

should nodes be relabelled with statnet vertex.names or igraph nodal attribute name

directed

whether the graph shall be treated as a directed graph. Per default (NULL), this is determined automatically using the structure of the provided network object

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

1
2
3
4
## Not run: 
to_py_graph(motifr::dummy_net, lvl_attr = "sesType")

## End(Not run)

motifr documentation built on Dec. 15, 2020, 5:23 p.m.