Applying R for public health
Please read this before you post:
- Questions in this category should address how R can be applied to solve analytical challenges in applied epidemiology and public health. For example:
- How to best visualize/communicate a public health finding using {ggplot2}
- Why your data-cleaning pipeline (%>%) isn’t producing the expected results
- How to apply a generic R package to perform a public health-specific task?
- Get help editing an R Markdown reports
- Do your research first
- You may find your answer in the Epidemiologist R Handbook, the R for Data Science book, or by searching on Stack Overflow. Please do a thorough search before posting.
- Summarize the steps you already took in a reproducible way
- Read our guidance on making a minimal reproducible example using the {reprex}
- To demonstrate your problem, either use a public dataset or use the {datapasta} R package write a command that re-creates a small portion of your de-identified data. Do not include sensitive or personal data in your reproducible example.
- "Tag" your question with relevant terms so that others can easily find it (e.g. R Markdown, Shiny, etc.)
Please read this before replying
- This is meant to be a space welcoming to beginners and forgiving of mistakes
- Multiple responses to one topic are welcome
- We suggest that you familiarize yourself with Applied Epi R training resources such as the Epi R Handbook, which to aid beginners emphasizes the following:
- {tidyverse} for general data handling
- {rio}, {here}, and RStudio projects for general data import and directory handling
- {pacman}
p_load()
for package install & load - {janitor}
tabyl()
for quick summary tables, or {dplyr} or {gtsummary} - Use of the
<-
assignment operator, not=
- Writing full argument names for clarity, such as
mapping = aes()
inggplot()
andifelse(test = , yes = , no = )