| Contacts-class | 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.
rootA character vector of length one with the
identifier of the root.
tBeginA Date vector of length one with the start
date of the time window used for contact tracing.
tEndA Date vector of length one with the end date of
the time window used for contact tracing.
sourceA character vector with the identifiers of the
source holdings of the livestock transfer.
destinationA character vector with the identifier of
the destination holdings of the livestock transfer.
tA Date vector of the livestock transfer.
idA character vector with the identifiers of the
animals.
nA numeric vector with the number of animals
transfered.
categoryA character vector with the category of
animals e.g. cattle.
indexA integer index vector.
distanceA integer vector with the distance from root
for the contact[index]
directionA character vector of length one equal to
the direction "in" or "out"
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.