transformGraphBy: Apply a function to a graph considering non-diagonal...

Description Usage Arguments Details Examples

View source: R/struct_equiv.R

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

1
2
3
4
5
6
7
8
9
transformGraphBy(graph, INDICES, fun = function(g, ...) g, ...)

## S3 method for class 'diffnet'
transformGraphBy(graph, INDICES, fun = function(g, ...) g,
  ...)

## S3 method for class 'dgCMatrix'
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

Examples

1
# Rewiring a graph by


netdiffuseR documentation built on May 19, 2017, 6:39 p.m.
Search within the netdiffuseR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.