Learn R Programming

netknitr (version 0.2.1)

getShapes: getShapes

Description

Generate shapes for the given nodes, shapes can be defined using the shapes otherwise defaults to null.

Usage

getShapes(nodes, shapes = NULL)

Value

a vector of shapes which is ready to cbind with nodes data

Arguments

nodes

nodes data, output of getNodes function

shapes

character vector indicating manual shapes to choose for nodes

Author

Jayachandra N

Examples

Run this code
nodes <- getNodes(head(mtcars), c("cyl", "gear", "vs"), group =TRUE)
nodes$shape <- getShapes(nodes)

Run the code above in your browser using DataLab