transformGraphBy: Apply a function to a graph considering non-diagonal structural zeros
Description
When there are structural zeros given by groups, this function applies
a particular transformation function of a graph by groups returning a
square matrix of the same size of the original one with structural zeros
and the function applied by INDICES.
Usage
transformGraphBy(graph, INDICES, fun = function(g, ...) g, ...)
"transformGraphBy"(graph, INDICES, fun = function(g, ...) g, ...)
"transformGraphBy"(graph, INDICES, fun = function(g, ...) g, ...)
Arguments
graph
A graph
INDICES
A vector of length $n$.
fun
A function to apply
...
Further arguments passed to fun
Details
The transformation function fun must return a square matrix
of size $m*m$, where $m$ is the size of the subgroup
given by INDICES. See examples below