effective: Compute Effective Resistance

Description Usage Arguments Value References Examples

View source: R/compute_effective.R

Description

This function computes the effective resistance, a concept of dissimilarity for nodes. A notable characteristic is that the square root of effective resistance values for a given network induces a metric structure of a graph. For simplicity, this function only accepts a network of \lbrace 0, 1 \rbrace binary edges.

Usage

1
effective(graph)

Arguments

graph

one of the followings; (1) an igraph object, (2) a network object, or (3) an (N\times N) adjacency matrix.

Value

an (N\times N) matrix of pairwise effective resistance values.

References

\insertRef

young_new_2016T4network

\insertRef

young_new_2016-1T4network

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## load the karate club data
data(karate, package="T4network")

## compute effective resistance & compute metrics
effres = effective(karate$A)
effmet = sqrt(effres)

## visualize
opar <- par(no.readonly=TRUE)
par(pty="s")
image(effmet[,34:1], axes=FALSE, main="metric matrix from ER")
par(opar)

kisungyou/T4network documentation built on Dec. 21, 2021, 6:44 a.m.