Description Usage Arguments Value Examples
Generating a graph based on an input vector of states
1 2 3 4 5 | makeEventDiagram(evt, nodeShapeBy = NA, graphName = "", ignoreRuns = F,
excludeEdges = NA, excludeNodes = c(NA, "NA"), minimalEdgeCount = 0,
shapes = c("rectangle", "oval", "diamond", "egg", "triangle",
"parallelogram", "house", "pentagon", "hexagon", "septagon", "octagon",
"doubleoctagon", "cds"), deleteIsolatedNodes = T)
|
evt |
A vector of events, which can be either numeric, char, or factor. The unique values of the vector will become the nodes (unless excluded). Edges will be draw from the current event to the next event (except those that are excluded). |
nodeShapeBy |
A vector of distinct values, of the same length as evt, such that event nodes with the same value of nodeShapeBy will have the same shape. |
graphName |
The Name of the graph. This string will be printed at the top of the output graph. |
ignoreRuns |
FALSE by default. If TRUE, run-length-encoding will be done on the evt vector, so that there are no self-referencial edges. |
excludeEdges |
A logical vector the same longth as the events. If True, the edge associated with corresponding event will not be drawn. NA by default. |
minimalEdgeCount |
The minimal number of transition occurances before an edge is drawn. |
shapes |
A character vector of graphviz node shapes. The list will be repeated if the number of nodes is larger than the length of the shapes vector. |
deleteIsolatedNodes |
Do not show isolated nodes (default = T) |
excludedNodes |
A vector of names of the nodes to be excluded. |
a DiagrammeR graph object
1 2 3 | df <- data.frame(evt=c("this", "2", "hi", "that", "2", "3"), by=c(1,2, 1, 1, 2, 2))
makeEventDiagram(df$evt)
g<-makeEventDiagram(df$evt, nodeShapeBy=df$by); print(g)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.