random_network: creates random augmented networks X and Y

Description Usage Arguments Value Examples

Description

This function allows the user to create random network X and an associated augmented network Y using either the Erdos-Renyi model or the Barabasi-Albert model.

Usage

1
random_network(original_node, additional_node, ngroup, edge_ratio,total_edge, type)

Arguments

original_node

the number of nodes in the original network X (default=25)

additional_node

the number of additional node in network Y (default=5)

ngroup

the number of additional taxa groups in network Y (default=1)

edge_ratio

the edge to node ratio (default=between 1 and 5)

total_edge

the number of edges in the fixed model

type

Either 'erdos' for the Erdos-Renyi model, 'barabasi' for the Barabasi-Albert model, 'watts' for the Watts-Strogatz model or 'fixed' fixed model allowing a defined number of edges

Value

Return a data.frame containing g1, g2, the total_nodes and the total_edges numbers of network Y and the total_original_nodes number of network X.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
	## Create a small random_network
	## Not run: 
		random_network()
	
## End(Not run)
	## Expected result:
	#
	#  $g1
	#   IGRAPH UNW- 25 23 -- Erdos renyi (gnm) graph
	#   + attr: name (g/c), type (g/c), loops (g/l), m (g/n), name (v/c), tax
	#    (v/c), weight (e/n)
	#
	#  $g2
	#   IGRAPH UNW- 30 30 -- Erdos renyi (gnm) graph
	#   + attr: name (g/c), type (g/c), loops (g/l), m (g/n), name (v/c), tax
	#    (v/c), weight (e/n)
	#
	#   $total_nodes
	#	[1] 30
	#
	#	$total_edges
	# 	[1] 30
	#
	#   $total_original_nodes
	#   [1] 25
	#
	## Create two networks using the Erdos-Renyi model with 100 nodes in network X 
	## and 10 additional nodes in network Y of 3 types. 
	random_network(100,10,3);
	## Create a random networks of 20 +10 additional node using the  Barabsi-Albert model
	## and compute the corresponding SDDE path types.
	## l <- random_network(20,10,ngroup=1,vertex_ratio=1, type='barabasi');
	## complete_network(l$g1, l$g2);

SDDE documentation built on May 1, 2019, 9:01 p.m.