Learn R Programming

EpiModel (version 2.2.1)

unique_id-tools: Convert Unique identifiers from/to Positional identifiers

Description

EpiModel refers to its nodes either by positional identifiers (posit_ids), the position of the node in the attr vectors or by unique identifiers (unique_ids), allowing to refer to nodes even after they are deactivated

Usage

get_unique_ids(dat, posit_ids = NULL)

get_posit_ids(dat, unique_ids = NULL)

Value

a vector of unique or positional identifiers

Arguments

dat

a Master list object of network models

posit_ids

a vector of node positional identifiers (default = NULL)

unique_ids

a vector of node unique identifiers (default = NULL)

All elements

When unique_ids or get_posit_ids is NULL (default) the full list of positional IDs or unique IDs is returned

Deactivated nodes

When providing unique_ids of deactivated nodes to get_posit_ids, NAs are returned instead and a warning is produced.