adj_to_wdnet {wdnet} | R Documentation |
Creates a wdnet
object using an adjacency matrix
Description
Creates a wdnet
object using an adjacency matrix
Usage
adj_to_wdnet(adj, directed = TRUE, weighted = TRUE, nodegroup, ...)
Arguments
adj |
An adjacency matrix used to extract |
directed |
Logical, whether the network is directed (TRUE) or undirected
(FALSE). If |
weighted |
Logical, whether the network is weighted (TRUE) or unweighted (FALSE). |
nodegroup |
A numeric vector of node groups. |
... |
Additional components to be added to the |
Value
A wdnet
object with the specified adj
.
Examples
adj <- matrix(c(0, 1, 2, 0), nrow = 2, ncol = 2, byrow = TRUE)
adj_to_wdnet(adj = adj, directed = TRUE, weighted = FALSE)
[Package wdnet version 1.2.3 Index]