get_vertex_attribute: Get Vertex Attribute on Network Object

View source: R/network.R

get_vertex_attributeR Documentation

Get Vertex Attribute on Network Object

Description

Gets a vertex attribute from an object of class network, wrapping the related function in the network package.

Usage

get_vertex_attribute(x, attrname)

Arguments

x

An object of class network.

attrname

The name of the attribute to get.

Details

This function is used in EpiModel workflow to query vertex attributes on an initialized empty network object (with network_initialize.

Value

Returns an object of class network.

Examples

## Not run: 
nw <- network_initialize(100)
nw <- set_vertex_attribute(nw, "age", runif(100, 15, 65))
get_vertex_attribute(nw, "age")

## End(Not run)


tergmLite documentation built on July 20, 2022, 5:06 p.m.