Learn R Programming

shinyCyJS (version 1.0.0)

buildElems: build multiple network elements by dataframe

Description

call buildNode or buildEdge function, note that only one function can be called

Usage

buildElems(elems, type)

Value

List typed multiple 'Node' or 'Edge' elements. It consisted with repeated buildNode or buildEdge function results with given parameter.

Arguments

elems

value of elements consisted in dataframe

type

Either 'Node' or 'Edge' [string]

See Also

buildNode(), buildEdge()

Examples

Run this code
nodes <- buildElems( # will generate 5 nodes
  elems = data.frame(
    id = paste0("node", 1:5),
    bgColor = "#FFFFFF",
    borderColor = "#48DBFB",
    borderWidth = 2,
    fontSize = 10,
    width = 60, height = 20, opacity = 1, stringsAsFactors = FALSE
  ), type = "Node"
)

Run the code above in your browser using DataLab