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

View source: R/mully_node.R

addNodeR Documentation

Add a node with assigned layer and attributes to a graph

Description

Add a node with assigned layer and attributes to a graph

Usage

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 mully graph, with the new node.

Examples

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

mully documentation built on March 7, 2023, 8:10 p.m.