graphCr | R Documentation |
Convenience function for quickly constructing graphs with character input
graphCr(
char,
...,
mode = "adjList",
useMatrices = FALSE,
format = "mixedgraph"
)
edgeCr(char, mode = "eList", vnames)
char |
string of inputs given by vertex names separated by edges |
... |
other strings of further edges |
mode |
format for edges in graph |
useMatrices |
deprecated argument: in |
format |
type of graph format to use, options are |
vnames |
list of variable names for use in |
Symbols -<>=*|:
are assumed to be part of an edge, so
cannot be used in node names using this function. Note that if we want
an edge with an o
on the end (e.g. o->
) then we must
leave a space between the o
and the variable name.
The edgeCr()
creates just an edgeList
object, and is helpful
for adding edges to existing graphs. The vnames
argument can be used if
the graph has non-standard vertex labels.
edgeCr()
: Create edge list by hand
graphCr("1--->2<-->3<-4","2<->4,4->5")
graphCr("1-2-3-4-1", representation="graphNEL") # requires package 'graph'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.