Learn R Programming

dynamicGraph (version 0.2.2.6)

dg.FactorVertex-class: Class dg.FactorVertex

Description

A skeleton class for the classes of factor vertices.

Arguments

Extends

Class "dg.Vertex", directly. Class "dg.Node", directly.

See Also

returnFactorVerticesAndEdges, dg.FactorEdge-class, dg.Vertex-class, dg.Node-class, and validFactorClasses.

Examples

Run this code
vertices       <- returnVertexList(paste("V", 1:4, sep = ""), 
                                   types = rep("Discrete", 4))
vertex.indices <- c(1, 2, 3)
vertices       <- new("dg.VertexList", vertices[c(1, 2, 3)])
name           <- paste(Labels(vertices), collapse = ":")

factor <- new("dg.Generator", vertex.indices = vertex.indices,
              position = apply(Positions(vertices), 2, mean),
              index = 0, color = "yellow", name = name, label = name)

factor <- new("dg.FactorVertex", vertex.indices = 1:3, vertices = vertices)

factor <- new("dg.FactorVertex", vertex.indices = 1:3, vertexList = vertices)

str(factor)

color(factor)
label(factor)
labelPosition(factor)
name(factor)
index(factor)
position(factor)
nodeIndices(factor)

color(factor) <- "green"
label(factor) <- "v-1-2-3"
labelPosition(factor) <- c(1, 2, 3)
name(factor) <- "V-123" 
index(factor) <- 3
position(factor) <- c( 10,  20,  30,  40)

str(factor)

Run the code above in your browser using DataLab