CIG | R Documentation |
Function CIG creates a clear interactions graph (CIG) from a catlg design (design name must be given). Function CIGstatic allows to create a static graph from a dynamically-adjusted one.
CIG(design, select.catlg = catlg, nfac = NULL, static = FALSE,
layout = layout.auto, label = "num", plot = TRUE, ...)
CIGstatic(graph, id, label = "num", xlim = c(-1,1), ylim = c(1,-1), ...)
gen2CIG(nruns, gen)
design |
a character string that identifies a design in the catalogue specified
by option |
select.catlg |
name of catalogue (not in quotes);
only relevant, if |
nfac |
number of factors; this is not needed for a class |
static |
logical. If |
layout |
ignored for |
label |
in effect for |
plot |
a logical that decides whether a plot is requested (default: |
... |
further arguments to be passed to function |
graph |
a graph object from package |
id |
identification number of the interactive graph to be reproduced in static form; this number can be found in the header line of the graphics window |
xlim |
horizontal axis limits |
ylim |
vertical axis limits (per default reversed in order to exactly reproduce the interactive graph) |
nruns |
number of runs of the design to be graphed |
gen |
generator (vector of Yates matrix column numbers) |
The design depicted in CIG
has to be the name (character string) of a
regular fractional factorial 2-level design present in select.catlg
.
Clear 2fis are depicted as edges in the graph. In the interactive graph, users can change the layout manually or with the menus. For example, the Reingold-Tilford layout can be chosen, with a root vertex specified; this sometimes helps in identifying groups of vertices that are not connected with each other.
Previous versions of package igraph
used to internally number the
vertices from 0 to number of vertices -1, not from 1 to number of vertices.
This has been changed
in June 2012 (FrF2 adapted to this change with version 1.5).
Function CIGstatic
serves the purpose to statically create the current
interactively modified graph;
the usual annotation possibilities for plots are available.
Function gen2CIG
returns a graph object that can be plotted or otherwise
investigated with graph-related
functionality.
For plot=FALSE
or plot=TRUE
with static=TRUE
,
function CIG
visibly (plot=FALSE
) or invisibly (plot=TRUE
)
returns a graph from package igraph
.
For plot=TRUE
with static=FALSE
,
the function returns a list with the first element graph
the element coords
with the coordinates of that graph.
Function CIGstatic
works on the list produced by function CIG
by plotting the graph statically using the positioning from the
current interactive picture.
Function gen2CIG
returns a clear interactions graph that can e.g. be
plotted with functions plot
(plot.igraph
) or
tkplot
.
Ulrike Groemping
Groemping, U. (2012). Creating clear designs: a graph-based algorithm and a catalog of clear compromise plans. IIE Transactions 44, 988-1001. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/0740817X.2012.654848")}. Early preprint at http://www1.bht-berlin.de/FB_II/reports/Report-2010-005.pdf.
plot.igraph
, tkplot
,
plot.common
## Not run:
ex.CIG <- CIG("9-4.2", vertex.color="white", vertex.label.color="darkred")
## play around with the dynamic graph until it looks right
## look up its id number in the title bar of the graph window and use it for id
par(xpd=TRUE)
CIGstatic(ex.CIG, id=1)
## End(Not run)
graph1 <- CIG("9-4.2", plot=FALSE) ### create graph object from design name
### calculate graph properties
require(igraph)
degree(graph1)
clique.number(graph1)
independence.number(graph1)
largest.cliques(graph1)
graph2 <- gen2CIG(32, c(7,11,14,29)) ### create graph object from generator columns
### check isomorphism to graph1
graph.isomorphic(graph1, graph2)
## Not run:
## use a CIG for manual design search
## requirement set:
estim <- compromise(9, 8:9)$requirement ## all interactions of factors 8 and 9 (H, J)
## graph the requirement set CIG
CIG(estim, vertex.color="white", vertex.label.color="darkred")
## a human can easily see that columns 1, 8 and 9 are worth a try for factors P, Q and R
CIG("9-4.1", vertex.color="white", vertex.label.color="darkred")
## obviously, 9-4.1 cannot accommodate the requirement set
CIG("9-4.2", vertex.color="white", vertex.label.color="darkred")
## 9-4.2 can, by assigning factors H and J to columns 5 and 9
## function FrF2 automatically does such matchings
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.