diag.remove: Remove the Diagonals of Adjacency Matrices in a Graph Stack

View source: R/dataprep.R

diag.removeR Documentation

Remove the Diagonals of Adjacency Matrices in a Graph Stack

Description

Returns the input graphs, with the diagonal entries removed/replaced as indicated.

Usage

diag.remove(dat, remove.val=NA)

Arguments

dat

one or more graphs.

remove.val

the value with which to replace the existing diagonals

Details

diag.remove is simply a convenient way to apply diag to an entire collection of adjacency matrices/network objects at once.

Value

The updated graphs.

Author(s)

Carter T. Butts buttsc@uci.edu

See Also

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

Examples

#Generate a random graph stack
g<-rgraph(3,5)
#Remove the diagonals
g<-diag.remove(g)

sna documentation built on Sept. 11, 2024, 8:45 p.m.

Related to diag.remove in sna...