| Contacts-class {EpiContactTrace} | R Documentation | 
Class "Contacts"
Description
Class to handle contacts.
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.
Slots
- root
- A - charactervector of length one with the identifier of the root.
- tBegin
- A - Datevector of length one with the start date of the time window used for contact tracing.
- tEnd
- A - Datevector of length one with the end date of the time window used for contact tracing.
- source
- A - charactervector with the identifiers of the source holdings of the livestock transfer.
- destination
- A - charactervector with the identifier of the destination holdings of the livestock transfer.
- t
- A - Datevector of the livestock transfer.
- id
- A - charactervector with the identifiers of the animals.
- n
- A - numericvector with the number of animals transfered.
- category
- A - charactervector with the category of animals e.g. cattle.
- index
- A - integerindex vector.
- distance
- A - integervector with the distance from root for the contact[index]
- direction
- A - charactervector of length one equal to the direction "in" or "out"
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,
    ...).
Examples
## 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)