check_attr_lengths: Check that All Attributes in the Main 'netsim_dat' Object are...

View source: R/net.fn.accessor.R

check_attr_lengthsR Documentation

Check that All Attributes in the Main netsim_dat Object are of Equal Length

Description

Every nodal attribute must hold exactly one value per node, the number of nodes being the length of the active attribute. This is checked at the end of each time step of netsim(). An attribute of the wrong length is usually created by an append_attr() call that does not cover every new node, or by direct assignment into dat$run$attr in place of the accessors.

Usage

check_attr_lengths(dat)

Arguments

dat

Main netsim_dat object containing a networkDynamic object and other initialization information passed from netsim().

Value

invisible(TRUE) if everything is correct; an error if not.


EpiModel documentation built on Oct. 16, 2026, 5:07 p.m.