addNode: Add a node with assigned layer and attributes to a graph

Description Usage Arguments Value Examples

View source: R/mully_node.R

Description

Add a node with assigned layer and attributes to a graph

Usage

1
addNode(g, nodeName, layerName, attributes = NA)

Arguments

g

The input graph.

nodeName

The name of the node to add.

layerName

The name of the layer to be assigned to the node.

attributes

The attributes of the node to add. This argument must be a named list.

Value

The graph, with the new node.

Examples

1
2
3
g=mully::demo()
attributes=list("specie"="Homo Sapiens")
addNode(g = g,nodeName = "g3",layerName = "Gene",attributes = attributes)

mully documentation built on Oct. 14, 2021, 5:06 p.m.