getNodeIndexbyName: Get node indices

Description Usage Arguments Value Author(s) See Also Examples

Description

Get the node index positions from their names

Usage

1

Arguments

graph

igraph graph

names

Character vector of names of the nodes whose index is queried

Value

A vector of index positions corresponding to the input names

Author(s)

J Bedia

See Also

Other graph.helpers: getNodeAttributes, getPlainPropertyList

Examples

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"))

Predictia/metaclipR documentation built on May 14, 2019, 6:07 a.m.