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

Description Usage Arguments Value Examples

View source: R/addAttributeList.R

Description

Add attributes using a list of vectors to an igraph object

Usage

1

Arguments

g

an igraph object

attr

the name of the attribute

l

the list of vectors

Value

the modified igraph object

Examples

1
2
3
4
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 Sept. 12, 2019, 1:43 p.m.