View source: R/build_metanet.R
build_metanet | R Documentation |
Build metanetwork object
build_metanet(
metaweb,
abTable = NULL,
trophicTable = NULL,
compute_local_nets = TRUE
)
metaweb |
metaweb of the metanetwork, object of class 'graph', 'matrix', 'data.frame' or 'dgCMatrix'. Metaweb needs to be directed and connected. This argument must be non-null. |
abTable |
node abundances in local networks, matrix of class 'matrix', columns must have names corresponding to node labels of the metaweb, rows are node abundances in local networks. Default is null, in that case, uniform abundances are assigned |
trophicTable |
a 'matrix' or 'data.frame' indicating hierarchy of the nodes. Names of the columns correspond to the different resolutions. It indicates the membership of each node of the metaweb. Default is null. |
compute_local_nets |
a boolean, indicates whether local networks must be computed or not.
Default is |
an object of S3 class 'metanetwork'
library(metanetwork)
library(igraph)
#with a single metaweb
g = igraph::make_ring(5,directed = TRUE)
meta = build_metanet(g)
#on Angola dataset (re-building the dataset)
data("meta_angola")
metaweb = meta_angola$metaweb
abTable = meta_angola$abTable
trophicTable = meta_angola$trophicTable
meta_angola = build_metanet(metaweb,abTable,trophicTable)
print(meta_angola)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.