Learn R Programming

EpiModel (version 2.2.1)

get_partners: Return the Historical Partners (Contacts) of a Set of Index Patients

Description

Return the Historical Partners (Contacts) of a Set of Index Patients

Usage

get_partners(
  dat,
  index_posit_ids,
  networks = NULL,
  truncate = Inf,
  only.active.nodes = FALSE
)

Value

A data.frame with 5 columns:

  • index: the unique ID see get_unique_ids) of the indexes.

  • partner: the unique ID see get_unique_ids) of the partners/contacts.

  • start: the time step in which the edge started.

  • stop: the time step in which the edge stopped; if ongoing, then NA is returned.

  • network: the numerical index for the network on which the partnership/contact is located.

Arguments

dat

Master list object of network models.

index_posit_ids

The positional IDs of the indexes of interest.

networks

Numerical indexes of the networks to extract the partnerships from. If NULL, extract from all networks.

truncate

After how many time steps a partnership that is no longer active should be removed from the output (default = Inf means no subsetting of output).

only.active.nodes

If TRUE, then inactive (e.g., deceased) partners will be removed from the output.