Learn R Programming

EpiContactTrace (version 0.8.8)

ShortestPaths-methods: ShortestPaths

Description

Methods for function ShortestPaths in package EpiContactTrace to get the shortest distance from/to the root given by the contact tracing.

Arguments

Value

  • A data.frame with the following columns: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Details

The contact tracing performs a depth first search starting at the root. The ShortestPaths gives the shortest distance from root at each node. The network tree structure given by the depth first search is shown by show.

See Also

show and NetworkStructure.

Examples

Run this code
## Load data
data(transfers)

## Perform contact tracing
contactTrace <- Trace(movements=transfers,
                      root=2645,
                      tEnd='2005-10-31',
                      days=90)

ShortestPaths(contactTrace)

Run the code above in your browser using DataLab