attachatt: Attach attributes to network

View source: R/attachatt.R

attachattR Documentation

Attach attributes to network

Description

Attach one or more node attributes to a network object.

Usage

attachatt(g, attdf, index, attvars)

Arguments

g

igraph graph with named nodes (includes an attribute for 'name')

attdf

Data frame containing desired attributes

index

Character string; name of column in 'attdf' that contains the node names, to be used for matching to graph names

attvars

Optional vector of variable name(s) in 'attdf' for attributes to be attached. If argument is missing, all variables in 'attdf' aside from the index column will be attached (with a warning message issued). To suppress warning, use attvars=NULL.

Value

The original network graph with attributes added


kturetsky/sneasy documentation built on Aug. 29, 2022, 7:11 a.m.