Description Usage Arguments Details Value Author(s) Examples
A simple interface to dynamicGraph
in the
sense that the graph should not be given as an object
as to dynamicGraphMain
. Here vertices can be
specified by a vector of text strings with names,
and/or edges by pairs of the indices of the vertices.
The function can also be used to add models and views to
an existing dynamicGraph
.
The interface is deprecated: Use the method dg
on an object of class dg.simple.graph-class
instead,
or the methods addModel
, addView
,
replaceModel
, or replaceView
.
1 2 3 4 5 6 7 8 9 10 11 12 | DynamicGraph(names = character(), types = character(),
from = vector(), to = vector(), edge.list = list(NULL),
labels = names, edge.types = character(),
blocks = list(NULL), block.tree = list(NULL), oriented = NA,
factors = list(NULL), texts = character(),
extra.from = vector(), extra.to = vector(),
extra.edge.list = list(NULL),
object = NULL, viewType = "Simple",
frameModels = NULL, frameViews = NULL, graphWindow = NULL,
addModel = FALSE, addView = FALSE, overwrite = FALSE,
returnNewMaster = FALSE, redraw = FALSE,
control = dg.control(...), ...)
|
names |
See |
types |
See |
from |
See |
to |
See |
edge.types |
See |
edge.list |
See |
labels |
See |
blocks |
See |
block.tree |
See |
oriented |
See |
factors |
See |
texts |
See |
extra.from |
See |
extra.to |
See |
extra.edge.list |
See |
viewType |
See |
object |
The model |
frameModels |
An object of class |
frameViews |
An object of class |
graphWindow |
An object of class |
addModel |
Logical, if |
addView |
Logical, if |
overwrite |
Logical, see the argument |
redraw |
Logical. If TRUE then the dynamicGraph of the
arguments |
returnNewMaster |
Logical. Alternative implementation of
|
control |
Options for |
... |
Additional arguments to |
After converting the arguments for the graph
first to an object of class dg.simple.graph-class
then to an object of class dg.graph-class
the function dynamicGraphMain
does all the work.
The list of objects can be exported from
dynamicGraphMain
, also after modifying the graph.
The returned value from dynamicGraphMain
.
Jens Henrik Badsberg
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | require(tcltk); require(dynamicGraph)
# Example 1:
W <- dg(as(new("dg.simple.graph", vertex.names = 1:5), "dg.graph"),
control = dg.control(title = "Very simple"))
# Example 2:
W <- dg(new("dg.simple.graph", from = 1:4, to = c(2:4, 1)),
control = dg.control(title = "Simply edges"))
# Example 3:
V.Types <- c("Discrete", "Ordinal", "Discrete",
"Continuous", "Discrete", "Continuous")
V.Names <- c("Sex", "Age", "Eye", "FEV", "Hair", "Shosize")
V.Labels <- paste(V.Names, 1:6, sep ="/")
From <- c(1, 2, 3, 4, 5, 6)
To <- c(2, 3, 4, 5, 6, 1)
W <- dg(new("dg.simple.graph", vertex.names = V.Names, types = V.Types,
labels = V.Labels, from = From, to = To),
control = dg.control(title = "With labels (extraVertices)"))
# Example 4: Oriented (cyclic) edges, without causal structure:
W <- dg(new("dg.simple.graph", vertex.names = V.Names, types = V.Types,
labels = V.Labels, from = From, to = To, oriented = TRUE),
control = dg.control(title = "Oriented edges"))
# Example 5: A factor graph:
Factors <- list(c(1, 2, 3, 4), c(3, 4, 5), c(4, 5, 6))
W <- dg(new("dg.simple.graph", vertex.names = V.Names, types = V.Types,
labels = V.Labels, factors = Factors, viewType = "Factor"),
control = dg.control(title = "Factorgraph", namesOnEdges = FALSE))
# Example 6: Edges with more than two vertices:
EdgeList <- list(c(1, 2, 3, 4), c(3, 4, 5), c(4, 5, 6))
W <- dg(new("dg.simple.graph", vertex.names = V.Names, types = V.Types,
labels = V.Labels, edge.list = EdgeList),
control = dg.control(title = "Multiple edges", namesOnEdges = FALSE))
W
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.