nameToVertexIndex {dynamicGraph}R Documentation

The indices of vertices

Description

For each name, find in a list of vertices the index of the vertex with that name.

Usage

nameToVertexIndex(vertexnames, vertices)

Arguments

vertexnames Vector of text strings of the vertexnames of the vertices for which the indices should be found.
vertices A list of vertices, of each of class containing the class dg.Node.

Value

Integer vector with the indices of the vertices.

Author(s)

Jens Henrik Badsberg

Examples

Names <- c("Sex", "Age", "Eye", "FEV", "Hair", "Shosize")
Types <- rep("Discrete", 6)
vertices <- returnVertexList(Names, types = Types)
nameToVertexIndex(c("Sex", "Eye"), vertices)

[Package dynamicGraph version 0.2.2.4 Index]