Description Usage Arguments Details Value Note Author(s) References Examples
Distances on graphs
1 | dist.graph(g, method=c("shortest.paths","diffusion"), v=V(g), correctInf = TRUE, ...)
|
g |
|
method |
|
v |
|
correctInf |
|
... |
bla
bla bla bla
bla bla bla
Florian Markowetz
http://www.markowetzlab.org/software
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (g, method = "shortest.paths", correctInf = TRUE, ...)
{
D <- switch(method, shortest.paths = shortest.paths(g, ...),
diffusion = graph.diffusion(g, ...)$dist)
if (correctInf)
D[D == Inf] <- max(D[D != Inf]) + 1
dimnames(D) <- list(V(g), V(g))
return(D)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.