CRAN Task View: Epidemiology

Maintainer:Thibaut Jombart, Matthieu Rolland, Hugo Gruson
Contact:hugo.gruson+ctv at
Contributions:Suggestions and improvements for this task view are very welcome and can be made through issues or pull requests on GitHub or via e-mail to the maintainer address. For further details see the Contributing guide.
Citation:Thibaut Jombart, Matthieu Rolland, Hugo Gruson (2024). CRAN Task View: Epidemiology. Version 2024-06-20. URL
Installation:The packages from this task view can be installed automatically using the ctv package. For example, ctv::install.views("Epidemiology", coreOnly = TRUE) installs all the core packages or ctv::update.views("Epidemiology") installs all packages that are not yet installed and up-to-date. See the CRAN Task View Initiative for more details.

Contributors (in alphabetic order): Neale Batra, Solène Cadiou, Dylan Dijk, Christopher Endres, Rich FitzJohn, Hugo Gruson, Andreas Handel, Michael Höhle, Thibaut Jombart, Joseph Larmarange, Sebastian Lequime, Alex Spina, Tim Taylor, Sean Wu, Achim Zeileis.


R is increasingly becoming a standard in epidemiology, providing a wide array of tools from study design to epidemiological data exploration, modeling, forecasting, and simulation. This task view provides an overview of packages specifically developed for epidemiology, including infectious disease epidemiology (IDE) and environmental epidemiology. It does not include:

Packages are grouped in the following categories:

  1. Data visualization: tools dedicated to handling and visualization of epidemiological data, e.g. epidemic curves (‘epicurves’), exploration of contact tracing networks, etc.
  2. Infectious disease modeling: IDE-specific packages for the analysis of epidemic curves (including outbreak detection / surveillance), estimation of transmissibility, short-term forecasting, compartmental models (e.g. SIR models), simulation of outbreaks, and reconstruction of transmission trees
  3. Environmental epidemiology: tools dedicated to the study of environmental factors acting as determinants of diseases
  4. Helpers: tools implementing miscellaneous tasks useful for practicing as well as teaching epidemiology, such as sample size calculation, fitting discretized Gamma distributions, or handling linelist data.
  5. Data packages: these packages provide access to both empirical and simulated epidemic data; includes a specific section on COVID-19.

Additional links to non specific but highly useful packages (to create tables, manipulate dates, etc.) are provided in the task view’s footnotes.

Inclusion criteria

Packages included in this task view were identified through recommendations of expert epidemiologists as well as an automated CRAN search using pkgsearch::pkg_search() with the keywords: epidemiology, epidemic, epi, outbreak, and transmission. The list was manually curated for the final selection to satisfy the conditions described in the previous paragraph.

Packages are deemed in scope if they provide tools, or data, explicitly targeted at reporting, modeling, or forecasting infectious diseases.

Your input is welcome! Please suggest packages we may have missed by filing an issue in the GitHub repository or by contacting the maintainer.

Data visualization

This section includes packages providing specific tools for the visualization and exploration of epidemiological data.

Infectious disease modeling

This section includes packages for specifically dedicated to IDE modeling. Note that R offers a wealth of options for general-purpose time series modeling, many of which are listed in the TimeSeries and Survival task views.

Epidemics surveillance

Packages below implement surveillance algorithms, but these approaches can be usefully complemented by spatial analyses. We recommend looking at the Spatial task view, which has a dedicated section on disease mapping and areal data analysis.

Individual-level data

Digital Epidemiology

Estimation of transmissibility

Compartmental models

Transmission tree reconstruction

Environmental epidemiology

Environmental epidemiology is dedicated to the study of physical, chemical, and biologic agents in the environment acting as determinants of disease. The aims of environmental epidemiology are to infer causality, to identify environmental causes of disease, such as from air and water pollutants, dietary contaminants, built environments, and others.

R packages dedicated to environmental epidemiology include tools dealing with limits of detection of pollutants (left-censoring issues), and various modeling approaches to account for multiple correlations between exposures and infer causality.


This section includes packages providing tools to facilitate epidemiological analysis as well as for training (e.g. computing sample size, contingency tables, etc).


Here are packages providing different epidemiologic datasets, either simulated or real, useful for research purposes or field applications with a specific COVID-19 section.

Epidemic outbreak data


Other data packages

CRAN packages

Core:EnvStats, Epi, epicontacts, EpiEstim, EpiModel, EpiNow2, epiR, epitools, incidence2, mediation, NADA, outbreaker2, outbreaks, R0, surveillance.
Regular:adegenet, AMR, apisensr, argo, Bernadette, bets.covid19, bkmr, cfr, cholera, cleanepi, cmprsk, coarseDataTools, contactdata, corona, coronavirus, COVID19,, covid19br, covid19dbcand, covid19france, covid19italy, covid19sf, covid19swiss, covid19us, CovidMutations, dbparser, dde, deSolve, DSAIDE, earlyR, endtoend, epibasix, EpiContactTrace, EpiCurve, epiDisplay, epiflows, EpiILM, EpiILMCT, epimdr, epinet, EpiReport, episensr, EpiSignalDetection, epitrix, epitweetr, etm, finalsize, HIMA, incidence, inctools, linelist, malariaAtlas, mem, memapp, mma, modelSSE, mstate, nbTransmission, nhanesA, nosoi, o2geosocial, odin, pomp, popEpi, powerSurvEpi, riskCommunicator, RSurveillance, SimInf, socialmixr, SpatialEpi, TransPhylo, trendeval, trending, tsiR.

Related links

Other resources