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
5
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))

paxtoolsr documentation built on Nov. 8, 2020, 8:29 p.m.