https://epirhandbook.com/ Skip to main content The Epidemiologist R Handbook Show table of contents [ ] Table of contents * * About this book * 1 Editorial and technical notes * 2 Download handbook and data * Basics * 3 R Basics * 4 Transition to R * 5 Suggested packages * 6 R projects * 7 Import and export * Data Management * 8 Cleaning data and core functions * 9 Working with dates * 10 Characters and strings * 11 Factors * 12 Pivoting data * 13 Grouping data * 14 Joining data * 15 De-duplication * 16 Iteration, loops, and lists * Analysis * 17 Descriptive tables * 18 Simple statistical tests * 19 Univariate and multivariable regression * 20 Missing data * 21 Standardised rates * 22 Moving averages * 23 Time series and outbreak detection * 24 Epidemic modeling * 25 Contact tracing * 26 Survey analysis * 27 Survival analysis * 28 GIS basics * Data Visualization * 29 Tables for presentation * 30 ggplot basics * 31 ggplot tips * 32 Epidemic curves * 33 Demographic pyramids and Likert-scales * 34 Heat plots * 35 Diagrams and charts * 36 Combinations analysis * 37 Transmission chains * 38 Phylogenetic trees * 39 Interactive plots * Reports and dashboards * 40 Reports with R Markdown * 41 Organizing routine reports * 42 Dashboards with R Markdown * 43 Dashboards with Shiny * Miscellaneous * 44 Writing functions * 45 Directory interactions * 46 Version control and collaboration with Git and Github * 47 Common errors * 48 Getting help * 49 R on network drives * 50 Data Table [Epi] R for applied epidemiology and public health This handbook strives to: * Serve as a quick R code reference manual * Provide task-centered examples addressing common epidemiological problems * Assist epidemiologists transitioning to R * Be accessible in settings with low internet-connectivity via an offline version [epiRhandbook_HexSticker_500x500] Written by epidemiologists, for epidemiologists We are applied epis from around the world, writing in our spare time to offer this resource to the community. Your encouragement and feedback is most welcome: * Structured feedback form * Email epiRhandbook@gmail.com or tweet @epiRhandbook * Submit issues to our Github repository How to use this handbook * Browse the pages in the Table of Contents, or use the search box * Click the "copy" icons to copy code * You can follow-along with the example data * See the "Resources" section of each page for further material Offline version See instructions in the Download handbook and data page. Languages We want to translate this into languages other than English. If you can help, please contact us. Acknowledgements This handbook is produced by a collaboration of epidemiologists from around the world drawing upon experience with organizations including local, state, provincial, and national health agencies, the World Health Organization (WHO), Medecins Sans Frontieres / Doctors without Borders (MSF), hospital systems, and academic institutions. This handbook is not an approved product of any specific organization. Although we strive for accuracy, we provide no guarantee of the content in this book. Contributors Editor-in-Chief: Neale Batra Project core team: Neale Batra, Alex Spina, Amrish Baidjoe, Pat Keating, Henry Laurenson-Schafer, Finlay Campbell Authors: Neale Batra, Alex Spina, Paula Blomquist, Finlay Campbell, Henry Laurenson-Schafer, Isaac Florence, Natalie Fischer, Aminata Ndiaye, Liza Coyer, Jonathan Polonsky, Yurie Izawa, Chris Bailey, Daniel Molling, Isha Berry, Emma Buajitti, Mathilde Mousset, Sara Hollis, Wen Lin Reviewers: Pat Keating, Annick Lenglet, Margot Charette, Daniely Xavier, Esther Kukielka, Michelle Sloan, Aybuke Koyuncu, Rachel Burke, Kate Kelsey, Berhe Etsay, John Rossow, Mackenzie Zendt, James Wright, Laura Haskins, Flavio Finger, Tim Taylor, Jae Hyoung Tim Lee, Brianna Bradley, Wayne Enanoria, Manual Albela Miranda, Molly Mantus, Pattama Ulrich, Joseph Timothy, Adam Vaughan, Olivia Varsaneux, Lionel Monteiro, Joao Muianga Illustrations: Calder Fong Funding and support The handbook received supportive funding via a COVID-19 emergency capacity-building grant from TEPHINET, the global network of Field Epidemiology Training Programs (FETPs). Administrative support was provided by the EPIET Alumni Network (EAN ), with special thanks to Annika Wendland. EPIET is the European Programme for Intervention Epidemiology Training. Special thanks to Medecins Sans Frontieres (MSF) Operational Centre Amsterdam (OCA) for their support during the development of this handbook. This publication was supported by Cooperative Agreement number NU2GGH001873, funded by the Centers for Disease Control and Prevention through TEPHINET, a program of The Task Force for Global Health. Its contents are solely the responsibility of the authors and do not necessarily represent the official views of the Centers for Disease Control and Prevention, the Department of Health and Human Services, The Task Force for Global Health, Inc. or TEPHINET. Inspiration The multitude of tutorials and vignettes that provided knowledge for development of handbook content are credited within their respective pages. More generally, the following sources provided inspiration for this handbook: The "R4Epis" project (a collaboration between MSF and RECON) R Epidemics Consortium (RECON) R for Data Science book (R4DS) bookdown: Authoring Books and Technical Documents with R Markdown Netlify hosts this website Terms of Use and License Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Academic courses and epidemiologist training programs are welcome to use this handbook with their students. If you have questions about your intended use, email epiRhandbook@gmail.com. Please note that the epiRhandbook project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms. 1 Editorial and technical notes On this page * * R for applied epidemiology and public health * How to use this handbook * Acknowledgements + Contributors + Funding and support + Inspiration * Terms of Use and License "The Epidemiologist R Handbook" was written by the handbook team. It was last built on 2021-05-10. This book was built by the bookdown R package.