These materials were developed for an LSHTM workshop introducing good practices using R for research. The workshop includes:
| Theme | Content | Key tools |
|---|---|---|
| Project set up | Reproducibility: RStudio projects Modularity: separating data, code, and reporting Documentation: READMEs and dependencies |
RStudio Projects renv |
| Writing code | Code style guidelines Writing, testing, and getting help Refactoring: managing existing code |
lintr stylr |
| Communicating & collaborating | Reporting with Rmarkdown Collaboration with Github |
Rmarkdown Github |
Workshop content draws on:
These resources cover all the key topics of the session (workflow, style guidance, R Markdown, and Git). If one doesn’t make sense to you, try another for a different explanation.
data.table package:
Arrow is a great option for storing very large (roughly >8GB) datasets efficiently, and can be read into R (almost) as easily as a .csv file:
.gitignore file to prevent Github from tracking or uploading a given data file:
trackdown for tracking changes with google docs: