Description Usage Arguments Examples
get/set more than one vertex attribute in an igraph object
1 | set.vertex.attributes(graph, D)
|
graph |
|
D |
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.