Skip to contents

Wrapper function to save a network or not in a file according to the store_network parameter. If store_network is TRUE, the network is saved in the output_file.

Usage

store_network(network, store_network, output_file, verbose = 1)

Arguments

network

A network (edge list)

store_network

Logical indicating if the network should be saved

output_file

The name of the file to save the network

verbose

(integer) - Display function messages. Set to 0 for no message displayed, >= 1 for more details.

Value

Nothing, but save the network in a file if store_network is TRUE

Examples

network <- read.table("network.tsv", header = TRUE, sep = "\t")
#> Warning: cannot open file 'network.tsv': No such file or directory
#> Error in file(file, "rt"): cannot open the connection
          store_network(network = network,
              store_network = TRUE,
              output_file = "network.tsv",
              verbose = 1)
#> 	Storing network in file :  network.tsv 
#> Error: object 'network' not found