individual_events: Individual events

View source: R/SimInf_indiv_events.R

individual_eventsR Documentation

Individual events

Description

In many countries, individual-based livestock data are collected to enable contact tracing during disease outbreaks. However, the livestock databases are not always structured in such a way that relevant information for disease spread simulations is easily retrieved. The aim of this function is to facilitate cleaning livestock event data and prepare it for usage in SimInf.

Usage

individual_events(events)

Arguments

events

a data.frame with the columns id, event, time, node, and dest to define the events, see details.

Details

The argument events in individual_events must be a data.frame with the following columns:

  • id: an integer or character identifier of the individual.

  • event: four event types are supported: exit, enter, internal transfer, and external transfer. When assigning the events, they can either be coded as a numerical value or a character string: exit; 0 or 'exit', enter; 1 or 'enter', internal transfer; 2 or 'intTrans', and external transfer; 3 or 'extTrans'.

  • time: an integer, character, or date (of class Date) for when the event occured. If it's a character it must be able to coerce to Date.

  • node: an integer or character identifier of the source node.

  • dest: an integer or character identifier of the destination node for movement events, and 'dest' will be replaced with NA for non-movement events.

Value

SimInf_indiv_events

See Also

node_events.


stewid/SimInf documentation built on April 26, 2024, 5:14 a.m.