Description Usage Arguments Value Examples
View source: R/sim_adjacency.R
sim_adjacency
creates a randomly generated adjacency matrix
1 | sim_adjacency(n, mode = "undirected", weight = NULL)
|
n |
Positive integer, number of nodes in the network |
mode |
A character string, indicating directedness of the matrix. Default is "undirected", where edges do not have direction (therefore adjacency matrix symmetric) |
weight |
A length-2 vector of non-negative integers, specifying the range
edge weights. Default is |
Returns an n x n adjacency matrix A.mat
1 2 | sim_adjacency(10, mode = "undirected") # symmetric; all edge weights 1
sim_adjacency(10, mode = "directed", weight = c(10, 20))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.