mlgraph | R Documentation |
A function to create and manipulate multilevel graphs
mlgraph(net, layout = c("circ", "force", "stress", "rand", "conc", "bip"), main = NULL,
seed = NULL, maxiter = 100, directed = TRUE, alpha = c(1, 1, 1), scope, collRecip,
undRecip, showLbs, showAtts, cex.main, coord, clu, cex, lwd, pch, lty, bwd, bwd2,
att, bg, mar, pos, asp, ecol, vcol, vcol0, col, lbat, swp, loops, swp2, mirrorX,
mirrorY, mirrorD, mirrorL, lbs, mirrorV, mirrorH, rot, hds, scl, vedist, ffamily,
fstyle, fsize, fcol, valued, modes, elv, lng, nr, ...)
net |
a |
layout |
the visualization layout:
|
main |
(optional) title of the plot |
seed |
(optional) random seed number for the vertices' initial coordinates. Ignored except for |
maxiter |
(optional) maximum number of iterations in layout algorithms. Ignored except for |
directed |
(logical) whether or not the graph is directed or undirected |
alpha |
vector (vertex, edge, |
scope |
(optional) scope of the graph (see details) |
collRecip |
(optional and logical) whether or not collapse reciprocated edges in the undirected graph |
undRecip |
(optional and logical) whether or not plot reciprocated edges as undirected |
showLbs |
(optional and logical) whether or not to show the vertex labels |
showAtts |
(optional and logical) whether or not to show the vertex attribute labels |
cex.main |
(optional) size of the plot's title |
coord |
(optional) data frame with the coordinates of the vertices. If coordinates are given then the |
clu |
(optional) clustering of the vertices as a list of vectors with integers or NULL (see details) |
cex |
(optional) size of the vertices |
lwd |
(optional) width of the edges; ignored if |
pch |
(optional) symbol representing the vertices |
lty |
(optional) shape of the edges |
bwd |
(optional) width of the bundle edges. Ranges from |
bwd2 |
(optional) width of the bundle loop edges. |
att |
(optional) a vector or an array representing the vertex attributes |
bg |
(optional) background color of the plot |
mar |
(optional) margins of the plot |
pos |
(optional) position of the vertices' labels ( |
asp |
(optional) aspect ratio of the plot |
ecol |
(optional) color of the edges |
vcol |
(optional) color of the vertices |
vcol0 |
(optional) color of the vertices' contour (only works for |
col |
(optional) alias for |
lbat |
(optional) labels for the vertex attributes |
swp |
(optional and logical) whether or not to swap the bundle patterns |
loops |
(optional, logical, and experimental) plot graph loops? |
swp2 |
(optional and logical) whether or not to swap reciprocals |
mirrorX |
(optional) mirror of the |
mirrorY |
(optional) mirror of the |
mirrorD |
(optional) mirror reflection across diagonal |
mirrorL |
(optional) mirror reflection across diagonal |
lbs |
(optional) vertex labels |
mirrorV |
same as |
mirrorH |
same as |
rot |
(optional) clockwise rotation of the graph in degrees |
hds |
(optional and experimental) arcs' head scale |
scl |
(optional and experimental) numerical scalar ( |
vedist |
(optional and experimental) a real number with vertex - edge distance |
ffamily |
the font family |
fstyle |
the font style |
fsize |
the font size |
fcol |
the font color |
valued |
(optional and logical) whether the graph is depicyed as valued or not |
modes |
(optional) a vector indicating which matrices are domains and which codomains (works only with a |
elv |
(experimental) control loops 1 |
lng |
(experimental) control loops 2 |
nr |
integer or |
... |
Additional argument items (see e.g. |
Multilevel graphs serve to represent networks with different “levels” such as different domains in the network structure. A characteristic of multilevel networks is the existence of ties within and across domains.
Since this function can handle a large number of arguments, these can be stored as a list object that is passed through the scope
option.
In this case, a vector made of lists and scalars or combinations of these is accepted.
The bundle width specified by bwd
and bwd2
ranges from 0
(edges collapsed) to the default 1
(depending on the vertices' size).
For the valued
option, a number greater than one is possible.
In a multilevel structure, argument clu
is to class network members
and it is possible to class all members of the domain or co-domain into a single class by setting the vector to NULL
.
Similarly, NULL
in argument nr
for the conc
layout implies the use of two radii, one for each domain.
A plot of the multilevel graph structure for the network
Multilevel graphs depend on multilevel class objects
Antonio Rivero Ostoic
mlvl
, multigraph
, bmgraph
, frcd
, stsm
, conc
## Not run:
# create network data as arrays
arr <- round( replace( array(runif(18), c(3,3,2)), array(runif(18),
c(3,3,2))>.5, 3 ) )
arr2 <- round( replace( array(runif(18), c(3,3,2)), array(runif(18),
c(3,3,2))>.5, 3 ) )
# create multilevel class object and plot multilevel graph
require(multiplex)
mlvl(arr, arr2) |>
mlgraph()
## End(**Not run**)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.