Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nodeData-methods

Get and set attributes for the nodes of a graph object


Description

Attributes of the nodes of a graph can be accessed using nodeData. The attributes must be defined using nodeDataDefaults. You can ommit the n argument to retrieve attributes for all nodes in the graph. You can ommit the attr argument to retrieve all attributes.

Usage

nodeData(self, n, attr)
nodeData(self, n, attr) <- value

Arguments

self

A graph-class instance

n

A character vector of node names

attr

A character vector of length one specifying the name of a node attribute

value

An R object to store as the attribute value


graph

graph: A package to handle graph data structures

v1.68.0
Artistic-2.0
Authors
R. Gentleman, Elizabeth Whalen, W. Huber, S. Falcon
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.