getShapes {netknitr} | R Documentation |
getShapes
Description
Generate shapes for the given nodes, shapes can be defined using the shapes otherwise defaults to null.
Usage
getShapes(nodes, shapes = NULL)
Arguments
nodes |
nodes data, output of getNodes function |
shapes |
character vector indicating manual shapes to choose for nodes |
Value
a vector of shapes which is ready to cbind with nodes data
Author(s)
Jayachandra N
Examples
nodes <- getNodes(head(mtcars), c("cyl", "gear", "vs"), group =TRUE)
nodes$shape <- getShapes(nodes)
[Package netknitr version 0.2.1 Index]