symMat | R Documentation |
Function to symmetrize an adjacency matrix in several ways
symMat(g, rule = "weak", na.rm = TRUE)
g |
a suqare numeric matrix, need not be binary |
rule |
the rule used to determine how to symmetrize
|
na.rm |
how to deal with missings, default is |
Symmetrizes a square matrix. There is a choice of several methods to do this.
the symmetrized matrix
g = matrix(sample(c(0,1), 25, replace = TRUE), nrow = 5) symMat(g, "weak") symMat(g, "mutual") g = matrix(runif(25), nrow = 5) diag(g) <- 0 symMat(g, "average")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.