powered by
wdnet
Creates a wdnet object using an adjacency matrix
adj_to_wdnet(adj, directed = TRUE, weighted = TRUE, nodegroup, ...)
A wdnet object with the specified adj.
adj
An adjacency matrix used to extract edgelist and edgeweight using igraph.
edgelist
edgeweight
igraph
Logical, whether the network is directed (TRUE) or undirected (FALSE). If adj is asymmetric, the network is directed.
Logical, whether the network is weighted (TRUE) or unweighted (FALSE).
A numeric vector of node groups.
Additional components to be added to the wdnet object.
adj <- matrix(c(0, 1, 2, 0), nrow = 2, ncol = 2, byrow = TRUE) adj_to_wdnet(adj = adj, directed = TRUE, weighted = FALSE)
Run the code above in your browser using DataLab