xIG2TB: Function to convert an igraph into a tibble for nodes or...

View source: R/xIG2TB.r

xIG2TBR Documentation

Function to convert an igraph into a tibble for nodes or edges

Description

xIG2TB is supposed to convert an igraph into a tibble for nodes or edges.

Usage

xIG2TB(ig, what = c("edges", "nodes"))

Arguments

ig

an "igraph" object

what

what to extract. It can be "edges" for edges and "nodes" for nodes

Value

a tibble object

Note

none

See Also

xIG2TB

Examples

set.seed(825)
ig <- sample_pa(20)
V(ig)$name <- seq(1,vcount(ig))
ig %>% xIG2TB('edges')
ig %>% xIG2TB('nodes')

hfang-bristol/XGR documentation built on Feb. 4, 2023, 7:05 a.m.