Learn R Programming

EpiContactTrace (version 0.8.8)

Contacts-class: Class "Contacts"

Description

Class to handle contacts.

Arguments

Objects from the Class

Objects can be created by calls of the form new("Contacts", root, startDate, days, source, destination, t, id, n, category, level, direction, ...).

Details

The Contacts class keeps track of all ingoing or outgoing livstock transfers in the contact chain for a specific root within the time window used for contact tracing. The slots; source, destination, t, id, n and category contains contact information extracted from the movement dataset during contact tracing. The index slot is an index to the extracted contacts within the class that together with the distance slot can be used to rebuild the exact contacts that were extracted from each search step during the contact tracing.

Examples

Run this code
## Load data
data(transfers)

## Perform contact tracing
contactTrace <- Trace(movements = transfers,
                      root = 2645,
                      tEnd = '2005-10-31',
                      days = 90)

## Show structure of ingoing contacts
str(contactTrace@ingoingContacts)

## Show structure of ougoing contacts
str(contactTrace@outgoingContacts)

Run the code above in your browser using DataLab