edgelist_to_wdnet | R Documentation |
wdnet
object using edgelist
.Creates a wdnet
object using edgelist
.
edgelist_to_wdnet(edgelist, edgeweight, directed, nodegroup, ...)
edgelist |
A two-column matrix representing the edges. |
edgeweight |
A numeric vector of edge weights with the same length as
the number of rows in edgelist. If |
directed |
Logical, whether the network is directed (TRUE) or undirected (FALSE). |
nodegroup |
A numeric vector of node groups. |
... |
Additional components to be added to the |
A wdnet
object with the specified edgelist
,
edgeweight
and directed
.
edgelist <- matrix(c(1, 2, 2, 3, 3, 1), ncol = 2, byrow = TRUE)
edgeweight <- c(1, 2, 3)
nodegroup <- c(1, 1, 2)
netwk <- edgelist_to_wdnet(
edgelist = edgelist,
edgeweight = edgeweight,
directed = TRUE,
nodegroup = nodegroup
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.