get_vertex_attribute | R Documentation |
Gets a vertex attribute from an object of class network
,
wrapping the related function in the network
package.
get_vertex_attribute(x, attrname)
x |
An object of class network. |
attrname |
The name of the attribute to get. |
This function is used in EpiModel
workflow to query vertex attributes on
an initialized empty network object (with network_initialize
.
Returns an object of class network
.
## Not run: nw <- network_initialize(100) nw <- set_vertex_attribute(nw, "age", runif(100, 15, 65)) get_vertex_attribute(nw, "age") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.