set.vertex.attributes: Get/set more than one vertex attribute in an igraph object

Description Usage Arguments Examples

Description

get/set more than one vertex attribute in an igraph object

Usage

1

Arguments

graph
D

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.
1+1

## The function is currently defined as
function (graph, D) 
{
    if (!is.igraph(graph)) 
        stop("Not a graph object")
    if (!is.data.frame(D)) 
        stop("Not a dataframe")
    for (i in colnames(D)) graph <- set.vertex.attribute(graph, 
        i, value = D[, i])
    return(graph)
  }

nea documentation built on May 2, 2019, 5:52 p.m.