Contacts-class {EpiContactTrace} | R Documentation |
"Contacts"
Class to handle contacts.
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.
A character
vector of length one with the identifier of the root.
A Date
vector of length one with the start date of the time
window used for contact tracing.
A Date
vector of length one with the end date of the time
window used for contact tracing.
A character
vector with the identifiers of the source holdings
of the livestock transfer.
A character
vector with the identifier of the destination holdings
of the livestock transfer.
A Date
vector of the livestock transfer.
A character
vector with the identifiers of the animals.
A numeric
vector with the number of animals transfered.
A character
vector with the category of animals e.g. cattle.
A integer
index vector.
A integer
vector with the distance from root for the contact[index]
A character
vector of length one equal to the direction 'in' or 'out'
of the contacts.
Objects can be created by calls of the
form new("Contacts", root, startDate, days, source, destination, t,
id, n, category, level, direction, ...)
.
## 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)