## Copyright 2013-2020 Stefan Widgren and Maria Noremark,
## National Veterinary Institute, Sweden
##
## Licensed under the EUPL, Version 1.1 or - as soon they
## will be approved by the European Commission - subsequent
## versions of the EUPL (the "Licence");
## You may not use this work except in compliance with the
## Licence.
## You may obtain a copy of the Licence at:
##
## http://ec.europa.eu/idabc/eupl
##
## Unless required by applicable law or agreed to in
## writing, software distributed under the Licence is
## distributed on an "AS IS" basis,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
## express or implied.
## See the Licence for the specific language governing
## permissions and limitations under the Licence.
##' Class \code{"ContactTrace"}
##'
##' Class to handle contact tracing.
##'
##'
##' The \code{ContactTrace} class holds information for the ingoing
##' and outgoing contact chain for a specific root within the time
##' window used for contact tracing.
##' @slot root A \code{character} vector of length one with the
##' identifier of the root.
##' @slot ingoingContacts A \code{Contacts} object with the contacts
##' for the ingoing contact chain.
##' @slot outgoingContacts A \code{Contacts} object with the contacts
##' for the outgoing contact chain.
##' @include Contacts.R
##' @section Objects from the Class: Objects can be created by calls
##' of the form \code{new("ContactTrace",root, ingoingContacts,
##' outgoingContacts,...)}
##' @export
##' @examples
##'
##' ## Load data
##' data(transfers)
##'
##' ## Perform contact tracing
##' contactTrace <- Trace(movements = transfers,
##' root = 2645,
##' tEnd = "2005-10-31",
##' days = 90)
##'
##' ## Show structure
##' str(contactTrace)
setClass(
"ContactTrace",
slots = c(root = "character",
ingoingContacts = "Contacts",
outgoingContacts = "Contacts")
)
setAs(
from = "ContactTrace",
to = "data.frame",
def = function(from) {
rbind(as(from@ingoingContacts, "data.frame"),
as(from@outgoingContacts, "data.frame"))
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.