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

upper.tri.remove

Remove the Upper Triangles of Adjacency Matrices in a Graph Stack


Description

Returns the input graph stack, with the upper triangle entries removed/replaced as indicated.

Usage

upper.tri.remove(dat, remove.val=NA)

Arguments

dat

a graph or graph stack.

remove.val

the value with which to replace the existing upper triangles.

Details

upper.tri.remove is simply a convenient way to apply g[upper.tri(g)]<-remove.val to an entire stack of adjacency matrices at once.

Value

The updated graph stack.

Author(s)

Carter T. Butts buttsc@uci.edu

See Also

Examples

#Generate a random graph stack
g<-rgraph(3,5)
#Remove the upper triangles
g<-upper.tri.remove(g)

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.