Description Usage Arguments Value Author(s) See Also Examples
Get the node index positions from their names
1 | getNodeIndexbyName(graph, names)
|
graph |
|
names |
Character vector of names of the nodes whose index is queried |
A vector of index positions corresponding to the input names
J Bedia
Other graph.helpers: getNodeAttributes
,
getPlainPropertyList
1 2 3 4 | require(igraph)
graph <- make_graph(c("A", "B", "B", "C", "C", "D", "Pepe"), directed = FALSE)
getNodeIndexbyName(graph, "Pepe")
getNodeIndexbyName(graph, c("A","D","Pepe"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.