Learn R Programming

dynamicGraph (version 0.2.2.6)

dg.graph-class: Class dg.graph

Description

The representation of a graph for dynamicGraph. Vertices, blocks, viewType, edges, etc. are here the dynamicGraph objects.

Usage

dg(object,   ...)

Arguments

object
The graph.
...
Additional arguments.

Objects from the Class

Objects can be created by calls of the form new("dg.graph", ...).

Extends

Class "dg.graphedges", directly.

See Also

dg.simple.graph-class, and dynamicGraphMain.

Examples

Run this code
from <- c("contry", "contry", "race", "race",       "sex",  "sex")
to   <- c(   "sex",   "race", "hair",  "eye", "education",  "age")
vertexnames <- unique(sort(c(from, to)))
vertices <- returnVertexList(vertexnames)
edge.list <- vector("list", length(to))
for (j in seq(along = to)) edge.list[[j]] <- c(from[j], to[j])
edges <- returnEdgeList(edge.list, vertices, color = "red", oriented = TRUE)

graph <- new("dg.graph", vertexList = vertices, edgeList = edges); str(graph)
dg(graph)

Run the code above in your browser using DataLab