# Performs a Random Walk on a Graph

### Description

Performs random walk on a graph, with a restart probability of 0.7

### Usage

1 | ```
randomWalk(intM, queryGenes)
``` |

### Arguments

`intM` |
adjacency matrix of the graph, or object of graph format containing this matrix |

`queryGenes` |
genes with which to seed the random walk |

### Value

Returns a named vector of visitation probabilities for all nodes in the graph

### Author(s)

James Perkins Ian Morilla

Maintainer: James Perkins <jperkins@biochem.ucl.ac.uk>

### References

http://www.ncbi.nlm.nih.gov/pubmed/18371930

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 | ```
# using a graphNEL object
set.seed(123)
V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, 0.5)
visProbs <- randomWalk(g1, V[1:3])
# using a graph object
require(graph)
zz <- rbind(c(0,1,0,1), c(1,0,0,0), c(0,0,0,1), c(1,0,1,0))
colnames(zz) = rownames(zz) = letters[1:4]
visProbs <- randomWalk(zz, V[1])
``` |