Learn R Programming

seedy (version 1.3)

ancestors: Vector of infection ancestors

Description

Provides the chain of infection leading to a specified individual.

Usage

ancestors(x, ID, sources)

Arguments

x
Individual ID.
ID
List of person IDs.
sources
List of infection sources, corresponding to ID.

Details

First element will be the ID x, last element will be zero.

Examples

Run this code
data(outbreak)
ancestors(9, outbreak$epidata[,1], outbreak$epidata[,4])

Run the code above in your browser using DataLab