create_network_from_modules {SeqNet} | R Documentation |
Create a network object.
Description
Generates a 'network' object from a list of 'network_modules', The modules
are assumed to have their local network structure already generated.
Individual modules can be generated using the random_module
function.
Usage
create_network_from_modules(
p,
module_list,
node_names = as.character(1:p),
...
)
Arguments
p |
The number of nodes in the graph | |||||||||||||
module_list |
A named list of 'network_module' objects. | |||||||||||||
node_names |
(optional) Vector of strings providing names for each node in the graph. Default names are "1", "2", ..., "p". | |||||||||||||
... |
Arguments to be passed to other methods. Possible arguments include:
|
Value
A network object.
Examples
# Networks can be crafted manually by first constructing the individual
# modules, then putting them together to create a network.
module_1 <- random_module(1:10) # A module containing nodes 1-10
module_2 <- random_module(5:15) # A module containing nodes 5-15
# Create a network containing 20 nodes and the two modules.
nw <- create_network_from_modules(20, list(module_1, module_2))
nw
# Note: nodes 16-20 are not in a module, so they have no connections.
plot(nw)
[Package SeqNet version 1.1.3 Index]