Learn R Programming

EpiContactTrace (version 0.9.1)

NetworkStructure: NetworkStructure

Description

Methods for function NetworkStructure in package EpiContactTrace to get the network tree structure from the contact tracing.

Usage

NetworkStructure(object)
"NetworkStructure"(object)
"NetworkStructure"(object)

Arguments

object
A Contacts or linkS4class{ContactTrace} object.

Value

A data.frame with the following columns:
root
The root of the contact tracing
inBegin
If the direction is ingoing, then inBegin equals inBegin in Trace else NA.
inEnd
If the direction is ingoing, then inEnd equals inEnd in Trace else NA.
outBegin
If the direction is outgoing, then outBegin equals outBegin in Trace else NA.
outEnd
If the direction is outgoing, then outEnd equals outEnd in Trace else NA.
direction
If the direction is ingoing, then direction equals 'in' else 'out'
source
The source of the contacts in the depth first search
destination
The destination of the contacts in the depth first search
distance
The distance from the destination to root in the depth first search

Methods

signature(object = "Contacts")
Get the network structure for the Contacts object.
signature(object = "ContactTrace")
Get the network structure for the ingoing and outgoing Contacts of a ContactTrace object.
signature(object = "list")
Get the network structure for a list of ContactTrace objects. Each item in the list must be a ContactTrace object.

Details

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

See Also

show.

Examples

Run this code
## Not run: 
# 
# ## Load data
# data(transfers)
# 
# ## Perform contact tracing
# contactTrace <- Trace(movements=transfers,
#                       root=2645,
#                       tEnd='2005-10-31',
#                       days=90)
# 
# NetworkStructure(contactTrace)
# ## End(Not run)

Run the code above in your browser using DataLab