returnVertexList {dynamicGraph}R Documentation

The vertex list

Description

Return a list of vertices of classes containing the class VertexProto.

Usage

returnVertexList(names, labels = NULL, types = NULL, 
                 strata = NULL, line = FALSE, N = 3, 
                 colors = ifelse(types == "TextVertex", 
                                 "FloralWhite", "DarkRed"), 
                 vertexClasses = validVertexClasses())

Arguments

names Vector of text strings with the names of the vertices.
labels Vector of text strings with the labels of the vertices.
types Vector of text strings with the types of the vertices.
strata Vector of integers with the strata of the vertices.
line Logical, if TRUE then the vertices are positioned on a line, else in a regular polygone, in a circle.
N Integer, N is the number of coordinates of the vertices.
colors Vector of text strings with colors of the vertices.
vertexClasses The valid vertexClasses.

Value

A list of vertices of classes containing the class VertexProto.

Note

The methods Names, Names<-, Colors, Colors<-, Labels, Labels<-, LabelPositions, LabelPositions<-, Positions, Positions<-, Strata, Strata<- and Indices are available for vertex lists.

Author(s)

Jens Henrik Badsberg

Examples

vertices <- returnVertexList(c("A", "B", "C", "D"),
                             labels = c("OrdinalVertex", "TextVertex", 
                               "ContinuousVertex", "DiscreteVertex"), 
                             types = c("Ordinal", "TextVertex",
                                       "Continuous", "Discrete"), N = 2)
Names(vertices)
Colors(vertices)
Labels(vertices)
LabelPositions(vertices)
Positions(vertices)
Strata(vertices)
Indices(vertices)
Names(vertices) <- c("a", "b", "c", "d")
Colors(vertices) <- rep("Blue", 4)
Labels(vertices) <- c("A", "B", "C", "D")
LabelPositions(vertices) <- matrix(rep(0, 12), ncol = 3)
Positions(vertices) <- matrix(rep(0, 12), ncol = 3)
Strata(vertices) <- rep(1, 4)
Names(vertices)
Colors(vertices)
Labels(vertices)
LabelPositions(vertices)
Positions(vertices)
Strata(vertices)
Indices(vertices)

[Package Contents]