addAttributeList: Add attributes using a list of vectors to an igraph object

View source: R/addAttributeList.R

addAttributeListR Documentation

Add attributes using a list of vectors to an igraph object

Description

Add attributes using a list of vectors to an igraph object

Usage

addAttributeList(g, attr, l)

Arguments

g

an igraph object

attr

the name of the attribute

l

the list of vectors

Value

the modified igraph object

Examples

library(igraph)
g <- barabasi.game(20)
g <- set_vertex_attr(g, "name", value=LETTERS[1:20])
g <- addAttributeList(g, "isProt", 
  list(A=TRUE, B=FALSE, C=TRUE, D=TRUE, E=FALSE))


cannin/paxtoolsr documentation built on Feb. 2, 2023, 11:44 a.m.