Learn R Programming

OutbreakTools (version 0.1-13)

ToyOutbreak: Simulated outbreak dataset

Description

This dataset is a fake dataset containing information on an outbreak amongst 418 individuals. It contains an obkData object called ToyOutbreak.

ToyOutbreak@individuals is a data.frame containing:

  • the ID of each individual, stored in the row names of thedata.frame
infector, the ID of the infector of each individual DateInfected, the date at which each individual was infected Sex, the sex of each individual Age, the age of each individual lat, the latitute corresponding to each individual lon, the longitude corresponding to each individual

Arguments

code

multiphylo

itemize

  • individualID, the ID of each individual,

item

  • date, the date at which temperature was measured in each individual,
  • temperature, the temperature measured in each individual.

Examples

Run this code
## Load data ##
data(ToyOutbreak)

## Overview of the dataset ##
summary(ToyOutbreak)

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

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

Run the code above in your browser using DataLab