Learn R Programming

snowboot (version 0.5.0)

igraph_to_network: Create a "Network" Object from an igraph Object

Description

This function will take an igraph object and output a "network" which is the compatible object for using snowboot functions.

Usage

igraph_to_network(in_graph)

Arguments

in_graph
An igraph object. To create igraph objects from field data, see graph_from_edgelist, graph_from_data_frame,

Value

  • A list that contain elements:
  • edgesThe edgelist of the network. A two column matrix where each row is an edge.
  • degreeThe degree sequence of the network, which is an integer vector of length n.
  • nThe network order.

References

http://igraph.org/

Examples

Run this code
hex_ring <- igraph::make_ring(6, directed = FALSE, mutual = FALSE, circular = TRUE)
net <- igraph_to_network(hex_ring)

Run the code above in your browser using DataLab