Learn R Programming

phyloTop (version 2.1.2)

getLabGenealogy: Create genealogy

Description

Create a labelled genealogy from an epidemiological record

Usage

getLabGenealogy(epirecord, epsilon = 0.001234)

Value

An object of class phylo representing the transmission tree from infectors to infectees.

Arguments

epirecord

an epidemiological record, as output from the function makeEpiRecord. It must be a matrix of at least two rows and with five columns named "Infectee", "Infector", "InfnTime", "RecTime", "DoneFlag".

epsilon

an optional small number to be used for branch lengths which would otherwise be zero.

Author

Caroline Colijn c.colijn@imperial.ac.uk

Michelle Kendall michelle.louise.kendall@gmail.com

See Also

makeEpiRecord

Examples

Run this code
## Generate an epidemiological record:
myepirecord <- makeEpiRecord(c(1,2,3,4))
## make the corresponding genealogy from this record:
mygenealogy <- getLabGenealogy(myepirecord)
plot(mygenealogy)

Run the code above in your browser using DataLab