NetworkStructure-methods: 'NetworkStructure'

NetworkStructureR Documentation

NetworkStructure

Description

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

Usage

NetworkStructure(object)

## S4 method for signature 'Contacts'
NetworkStructure(object)

## S4 method for signature 'ContactTrace'
NetworkStructure(object)

## S4 method for signature 'list'
NetworkStructure(object)

Arguments

object

A Contacts or linkS4class{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.

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.

See Also

show.

Examples

## Load data
data(transfers)

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

NetworkStructure(contactTrace)

EpiContactTrace documentation built on Oct. 5, 2024, 1:07 a.m.