gs.edge.ptr: Run pass-to-rank on a weighted graph.

Description Usage Arguments Value Author(s)

Description

It extracts a (non-zero) edge weight vector W from a graph and replaces it with 2*R / (|E|+1) where R is the rank of W and |E| is the number of edges. This does 'no-op' for an unweighted or binary graph.

Usage

1
gs.edge.ptr(g, edge.attr = NULL, output.type = "matrix")

Arguments

g

an igraph object or an nxn adjacency matrix with n vertices.

edge.attr

if g is a igraph, the name of the attribute to use for weights. Defaults to NULL, which assumes the graph is binary.

is.null(edge.attr)

constructs sbm on the graph as a binary adjacency matrix.

is.character(edge.attr)

constructs sbm of the graph the graph as a weighted adjacency matrix, with edge-weights for E(g) given by get.edge.attribute(g, attr=edge.attr).

output.type

the type of output to produce for the between community expectations. Defaults to matrix.

"matrix"

produces a matrix for the between-communitity interactions.

"graph"

produces an igraph object for the between-community interactions.

Value

an igraph object or an nxn adjacency matrix with n vertices depending on output.type.

Author(s)

Eric Bridgeford ericwb95@gmail.com


neurodata/graphstats documentation built on May 14, 2019, 5:19 p.m.