dg.ExtraEdge-class {dynamicGraph}R Documentation

Class "dg.ExtraEdge"

Description

The class for the edges between vertices and extra vertices.

Usage

newExtraEdge(node.indices, nodes = NULL, width = 2,
             color = "DarkOliveGreen", type = NULL,
             label = ifelse(is.null(nodes), "",
                            paste(Labels(nodes), collapse = "~")),
             dash = "")

Arguments

node.indices Vector with abs(node.indices) the indices of the nodes of the extra edge. If the index is positiv then the node is a vertex, else it is the extra vertex.
nodes List with the nodes of the extra edge. Used for setting the default label.
width Numeric for the width of the extra edge.
color Text string with the color of the extra edge.
type Text string with the type of the extra edge.
label Text string with the label of the extra edge.
dash Text string for the dash pattern of the edge.

Slots

vertex.indices:
Object of class "numeric", see "dg.Edge".
width:
Object of class "numeric", see "dg.Edge".
dash:
Object of class "character", see "dg.Edge".
color:
Object of class "character", see "dg.Edge".
label:
Object of class "character", see "dg.Edge".
label.position:
Object of class "numeric", see "dg.Edge".

Extends

Class "dg.Edge", directly. Class "dg.Node", by class "dg.Edge".

Methods

nodeTypesOfEdge
signature(object = "dg.ExtraEdge"): Extract the types ("super classes": "Vertex" or "Extra") of the vertices (nodes) of the edge.

Note

The methods (except oriented) of dg.Edge also applies for dg.ExtraEdge.

Extra vertices and nodes are used in demo(dg.USArrests) to display the loadings in a biplot.

Author(s)

Jens Henrik Badsberg

See Also

returnExtraEdgeList, dg.Edge-class, and dg.TextVertex-class.

Examples

vertices  <- returnVertexList(paste("V", 1:4, sep = ""))
extra     <- returnVertexList(paste("E", 1:4, sep = ""))
extraedge <- newExtraEdge(c(3, -2), 
                          new("dg.VertexList", c(vertices[3], extra[2])))
str(extraedge)

color(extraedge)
label(extraedge)
labelPosition(extraedge)
width(extraedge)
nodeIndicesOfEdge(extraedge)
nodeTypesOfEdge(extraedge)

color(extraedge) <- "Black"
label(extraedge) <- "Gryf"
labelPosition(extraedge) <- c(0, 1, 2)
width(extraedge) <- 1
nodeIndicesOfEdge(extraedge) <- c(1, -1)
str(extraedge)

[Package dynamicGraph version 0.1.7.0 Index]