lower.tri.remove: Remove the Lower Triangles of Adjacency Matrices in a Graph...

View source: R/dataprep.R

lower.tri.removeR Documentation

Remove the Lower Triangles of Adjacency Matrices in a Graph Stack

Description

Returns the input graph set, with the lower triangle entries removed/replaced as indicated.

Usage

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

Arguments

dat

one or more input graphs.

remove.val

the value with which to replace the existing lower triangles.

Details

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

Value

The updated graph set.

Author(s)

Carter T. Butts buttsc@uci.edu

See Also

lower.tri, upper.tri.remove, diag.remove

Examples

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


sna documentation built on Feb. 16, 2023, 9:52 p.m.

Related to lower.tri.remove in sna...