Travis-CI Build Status Build status codecov

# set global chunk options: images will be 7x7 inches
knitr::opts_chunk$set(fig.width=7, fig.height=7, fig.path="figs/", warning=FALSE)
options(digits = 4)

dibbler: investigation of food-borne disease outbreaks

And then you bit onto them, and learned once again that Cut-me-own-Throat Dibbler could find a use for bits of an animal that the animal didn't know it had got. Dibbler had worked out that with enough fried onions and mustard people would eat anything. [Terry Pratchett, Moving Pictures.]

dibbler provides tools for investigating food-borne outbreaks with (at least partly) known food distribution networks, and genetic information on the cases. This document provides an overview of the package's content.

Installing dibbler

To install the development version from github:

library(devtools)
install_github("thibautjombart/dibbler")

The stable version can be installed from CRAN using:

install.packages("dibbler")

Then, to load the package, use:

library("dibbler")

A short demo

Here is a short demonstration of the package using an anonymised Salmonella outbreak dataset, distributed in the outbreaks package as s_enteritidis_pt59. The function make_dibbler will match the structure of the network and the case data, and create a dibbler object:

library("outbreaks")

names(s_enteritidis_pt59$graph)
head(s_enteritidis_pt59$graph)
dim(s_enteritidis_pt59$graph)
s_enteritidis_pt59$cluster

case_data <- with(s_enteritidis_pt59, 
                  data.frame(id = names(cluster), cluster = cluster))
head(case_data)

x <- make_dibbler(net = s_enteritidis_pt59$graph, nodes_data = case_data)
x

The resulting object is an extension of epicontact objects; for more information on these objects, and how to handle them, see the epicontacts website.

Here we plot the object, asking to use "cluster" to define colored groups:

plot(x, "cluster")

This is a screenshot of the actual image, which needs to be visualised on a web broswer. Groups are indicated in colors, while different types of nodes are indicated with different symbols:



thibautjombart/dibbler documentation built on May 31, 2019, 9:56 a.m.