Learn R Programming

dynamicGraph (version 0.2.2.6)

nameToVertexIndex: 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.

Examples

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

Run the code above in your browser using DataLab