Description Usage Arguments Value Examples

View source: R/multiNode.getNodeRanks.r

This function calculates the node rankings starting from a given perturbed variable in a subset of variables in the background knowledge graph.

1 | ```
multiNode.getNodeRanks(S, G, num.misses = NULL, verbose = FALSE)
``` |

`S` |
- A character vector of the node names for the subset of nodes you want to encode. |

`G` |
- A list of probabilities with list names being the node names of the background graph. |

`num.misses` |
- The number of "misses" the network walker will tolerate before switching to fixed length codes for remaining nodes to be found. |

`verbose` |
- If TRUE, print statements will execute as progress is made. Default is FALSE. |

ranks - A list of character vectors of node names in the order they were drawn by the probability diffusion algorithm, from each starting node in S.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
# Read in any network via its adjacency matrix
tmp = matrix(1, nrow=100, ncol=100)
for (i in 1:100) {
for (j in 1:100) {
tmp[i, j] = rnorm(1, mean=0, sd=1)
}
}
colnames(tmp) = sprintf("Compound%d", 1:100)
ig = graph.adjacency(tmp, mode="undirected", weighted=TRUE, add.colnames="name")
V(ig)$name = tolower(V(ig)$name)
# Get node rankings for graph
G = vector(mode="list", length=length(V(ig)$name))
names(G) = V(ig)$name
S = names(G)[1:3]
ranks = multiNode.getNodeRanks(S, G)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.