EVOLUTION-MANAGER
Edit File: vertex_attr-set.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Set one or more vertex attributes</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for vertex_attr&lt;- {igraph}"><tr><td>vertex_attr<- {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Set one or more vertex attributes</h2> <h3>Description</h3> <p>Set one or more vertex attributes </p> <h3>Usage</h3> <pre> vertex_attr(graph, name, index = V(graph)) <- value </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The graph.</p> </td></tr> <tr valign="top"><td><code>name</code></td> <td> <p>The name of the vertex attribute to set. If missing, then <code>value</code> must be a named list, and its entries are set as vertex attributes.</p> </td></tr> <tr valign="top"><td><code>index</code></td> <td> <p>An optional vertex sequence to set the attributes of a subset of vertices.</p> </td></tr> <tr valign="top"><td><code>value</code></td> <td> <p>The new value of the attribute(s) for all (or <code>index</code>) vertices.</p> </td></tr> </table> <h3>Value</h3> <p>The graph, with the vertex attribute(s) added or set. </p> <h3>See Also</h3> <p>Other graph attributes: <code><a href="delete_edge_attr.html">delete_edge_attr</a>()</code>, <code><a href="delete_graph_attr.html">delete_graph_attr</a>()</code>, <code><a href="delete_vertex_attr.html">delete_vertex_attr</a>()</code>, <code><a href="edge_attr-set.html">edge_attr<-</a>()</code>, <code><a href="edge_attr_names.html">edge_attr_names</a>()</code>, <code><a href="edge_attr.html">edge_attr</a>()</code>, <code><a href="graph_attr-set.html">graph_attr<-</a>()</code>, <code><a href="graph_attr_names.html">graph_attr_names</a>()</code>, <code><a href="graph_attr.html">graph_attr</a>()</code>, <code><a href="igraph-dollar.html">igraph-dollar</a></code>, <code><a href="igraph-vs-attributes.html">igraph-vs-attributes</a></code>, <code><a href="set_edge_attr.html">set_edge_attr</a>()</code>, <code><a href="set_graph_attr.html">set_graph_attr</a>()</code>, <code><a href="set_vertex_attr.html">set_vertex_attr</a>()</code>, <code><a href="vertex_attr_names.html">vertex_attr_names</a>()</code>, <code><a href="vertex_attr.html">vertex_attr</a>()</code> </p> <h3>Examples</h3> <pre> g <- make_ring(10) vertex_attr(g) <- list(name = LETTERS[1:10], color = rep("yellow", gorder(g))) vertex_attr(g, "label") <- V(g)$name g plot(g) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>