ToyOutbreakRaw: Raw simulated outbreak dataset

Description Author(s) Examples

Description

This dataset is a fake dataset containing information on an outbreak amongst 418 individuals. It contains a list called ToyOutbreakRaw of the following objects:

- ToyOutbreakRaw$individuals, a data.frame containing:

- ToyOutbreakRaw$records, a list containing one data.frame called Fever containing:

- ToyOutbreakRaw$contacts, a matrix with two columns called from and to describing contacts between individuals

- ToyOutbreakRaw$contacts.start, a vector containing the start dates of each contact stored in ToyOutbreakRaw$contacts.

- ToyOutbreakRaw$contacts.end, a vector containing the end dates of each contact stored in ToyOutbreakRaw$contacts.

- ToyOutbreakRaw$dna is a list of two DNAbin matrices corresponding to two different genes.

- ToyOutbreakRaw$dna.info is a data.frame containing:

- ToyOutbreakRaw$tree is a multiphylo object storing a phylogenetic tree.

Author(s)

Anne Cori, Lulla Opatowski

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## Load data ##
data(ToyOutbreakRaw)
attach(ToyOutbreakRaw)

## Constructing an obkData object ##
x <- new ("obkData", individuals=individuals, records=records,
          contacts=contacts, contacts.start=contacts.start,
          contacts.end=contacts.end, dna=dna,
          dna.individualID=dna.info$individualID,
          dna.date=dna.info$date, sample=dna.info$sample, trees=trees)

detach(ToyOutbreakRaw)


## Examining the object ##
summary(x)

head(x@individuals)
head(x@records)
names(x@records)
head(x@records$Fever)
x@contacts
x@dna
x@trees

## Plotting the dynamic contact network ##
par(mfrow=c(2,2))
plot(get.contacts(x),main="Contact network - days 0-3",displaylabels=TRUE)
plot(get.contacts(x, from=0, to=1.1), main="Contact network - days 0-1",
     displaylabels=TRUE)
plot(get.contacts(x, from=2, to=2.1), main="Contact network - day 2",
     displaylabels=TRUE)
plot(get.contacts(x, from=3, to=3.1), main="Contact network - day 3",
     displaylabels=TRUE)

## Mapping the outbreak (by sex) ##
plot(x,'geo',location=c('lon','lat'),zoom=13,colorBy='Sex')

OutbreakTools documentation built on Oct. 6, 2017, 1:03 a.m.