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

attrDataItem-methods

Get and set attributes values for items in an attrData object


Description

The attrDataItem method provides get/set access to items stored in a attrData-class object.

Usage

attrDataItem(self, x, attr)
attrDataItem(self, x, attr) <- value

Arguments

self

A attrData-class instance

x

A character vector of item names

attr

A character vector of length 1 giving the attribute name to get/set. Note that the attribute name must have already been defined for the attrData object via attrDefaults. If missing, return a list of all attributes for the specified nodes.

value

An R object to set as the attribute value for the specified items. If the object has length one or does not have a length method defined, it will be assigned to all items in x. If the length of value is the same as x, the corresponding elements will be assigned. We will add an argument to indicate that the value is to be taken as-is for those cases where the lengths are the same coincidentally.


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.