Using the mean firstpassage time method, compute the distances between vertex pairs in an undirected graph, with or without edge weights.
1 
g 

v 

edge.attr.weight 
String, the name of the edge attribute to be used as weights along the edges. Greater weights indicate a stronger interaction between the two genes (this is the opposite to edge distances, where smaller distances indicate stronger interactions). If 
average.distances 
Logical, if 
The mean firstpassage time from vertex A to vertex B is defined as the expected number of steps taken on a random walk emanating from vertex A until the first arrival at vertex B. This provides a method of measuring the distance between pairs of vertices that does not simply take into account the distance along the shortest path, but rather incorporates how well the two vertices are connected across multiple paths.
The mean firstpassage time from vertex A to vertex B is not necessarily the same as the mean firstpassage time from vertex B to vertex A. If a symmetric distance matrix is required, reciprocal distances can be averaged to give a single value for each vertex pair.
If a vertex pair is unconnected, then the distance between the vertices is Inf
.
The distance from vertex A to vertex A is always 0.
Numeric matrix, containing the mean firstpassage timederived vertex pair distance between each vertex in v
and every vertex in g
.
Alex J. Cornish a.cornish12@imperial.ac.uk
White, S. and Smyth, P. (2003). Algorithms for Estimating Relative Importance in Networks. Technical Report UCIICS 0425.
GraphDiffusion
,
shortest.paths
1 2 3 4 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.