These functions convert various objects to igraph graphs.

as.igraph(x, ...)

Arguments

x

The object to convert.

...

Additional arguments. None currently.

Value

All these functions return an igraph graph.

Details

You can use as.igraph() to convert various objects to igraph graphs. Right now the following objects are supported:

Author

Gabor Csardi csardi.gabor@gmail.com.

Examples


g <- make_full_graph(5) + make_full_graph(5)
hrg <- fit_hrg(g)
as.igraph(hrg)
#> IGRAPH ae454dd DN-- 19 18 -- Fitted HRG
#> + attr: name (g/c), name (v/c), prob (v/n)
#> + edges from ae454dd (vertex names):
#>  [1] g1->g4 g2->1  g3->2  g4->g6 g5->8  g6->g2 g7->g9 g8->6  g9->7  g1->g8
#> [11] g2->g3 g3->4  g4->3  g5->9  g6->5  g7->g5 g8->g7 g9->10