Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

symmetrize

Symmetrize an Adjacency Matrix


Description

Symmetrizes the elements of mats according to the rule in rule.

Usage

symmetrize(mats, rule="weak", return.as.edgelist=FALSE)

Arguments

mats

a graph or graph stack.

rule

one of “upper”, “lower”, “strong” or “weak”.

return.as.edgelist

logical; should the symmetrized graphs be returned in edgelist form?

Details

The rules used by symmetrize are as follows:

  1. upper: Copy the upper triangle over the lower triangle

  2. lower: Copy the lower triangle over the upper triangle

  3. strong: i<->j iff i->j and i<-j (AND rule)

  4. weak: i<->j iff i->j or i<-j (OR rule)

Value

The symmetrized graph stack

Author(s)

Carter T. Butts buttsc@uci.edu

References

Wasserman, S., and Faust, K. (1994). Social Network Analysis: Methods and Applications. Cambridge: Cambridge University Press.

Examples

#Generate a graph
g<-rgraph(5)

#Weak symmetrization
symmetrize(g)

#Strong symmetrization
symmetrize(g,rule="strong")

sna

Tools for Social Network Analysis

v2.6
GPL (>= 2)
Authors
Carter T. Butts [aut, cre, cph]
Initial release
2020-10-5

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.