library(NetFrac)
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

The input network can come from different sources. It has to be encoded as an object recognizable by the igraph tool in R. The function load_network() of the SDDE package can be used to load the network with its basic information.

File format

Two input files are needed to load the complete network information.

The first one is the network file, i.e., the list of the network edges, encoded as the node (species or object) names separated by a tab, and the weights attributed to each edge. One edge per line should be indicated.

The second file contains the information about the community to which each node (species or object) of the network belongs to. The node names and the community names should be separated by a tab. Some example of input files can be found in the 'exemples' folder.

Load_network

library(SDDE)
graph1 = load_network("../exemples/network_a.txt", "../exemples/network_a_tax.txt")
graph1 = set_color(graph1)
plot(graph1, vertex.size = 30)


XPHenry/Netfrac documentation built on Jan. 29, 2020, 12:14 p.m.