add.attribute: Function to set a vertex or edge attribute of a 'network' or...

View source: R/00.helpers.R

add.attributeR Documentation

Function to set a vertex or edge attribute of a network or graph object

Description

Function to set a vertex or edge attribute of a network or graph object

Usage

add.attribute(x, where = c("edge", "vertex"), attr_name, value, which = NULL)

Arguments

x

The representation of the network as a network or graph object

where

What network element does the attribute refer to. Either edge/tie or vertex/node.

attr_name

Name of the attribute to set

value

of the attribute to set

which

A subset of elements on which the attribute should be applied. Defaults to all the vertexes/nodes.

Value

A network or graph object with the desired attribute

Author(s)

Telarico, Fabio Ashtar


FinNet documentation built on Oct. 31, 2024, 5:07 p.m.