| 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
rootA
charactervector of length one with the identifier of the root.tBeginA
Datevector of length one with the start date of the time window used for contact tracing.tEndA
Datevector of length one with the end date of the time window used for contact tracing.sourceA
charactervector with the identifiers of the source holdings of the livestock transfer.destinationA
charactervector with the identifier of the destination holdings of the livestock transfer.tA
Datevector of the livestock transfer.idA
charactervector with the identifiers of the animals.nA
numericvector with the number of animals transfered.categoryA
charactervector with the category of animals e.g. cattle.indexA
integerindex vector.distanceA
integervector with the distance from root for the contact[index]directionA
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)