if (FALSE) {
## Load data
data(transfers)
## Perform contact tracing
contactTrace <- Trace(movements = transfers,
root = 2645,
tEnd = "2005-10-31",
days = 90)
ShortestPaths(contactTrace)
## Calculate shortest paths for all included herds
## First extract all source and destination from the dataset
root <- sort(unique(c(transfers$source, transfers$destination)))
sp <- ShortestPaths(transfers,
root = root,
tEnd = "2005-10-31",
days = 90)
}
Run the code above in your browser using DataLab