Additional Resources
Other R Resources
Resources within RStudio
Help documentation
Search the RStudio “Help” tab for documentation on R packages and specific functions. This is within the pane that also contains Files, Plots, and Packages (typically in the lower-right pane). As a shortcut, you can also type the name of a package or function into the R console after a question-mark to open the relevant Help page. Do not include parentheses.
For example: ?filter
or ?diagrammeR
.
Interactive tutorials
There are several ways to learn R interactively within RStudio.
RStudio itself offers a Tutorial pane that is powered by the learnr R package. Simply install this package and open a tutorial via the new “Tutorial” tab in the upper-right RStudio pane (which also contains Environment and History tabs).
The R package swirl offers interactive courses in the R Console. Install and load this package, then run the command swirl()
(empty parentheses) in the R console. You will see prompts appear in the Console. Respond by typing in the Console. It will guide you through a course of your choice.
Cheatsheets
There are many PDF “cheatsheets” available on the RStudio website, for example:
- Factors with forcats package
- Dates and times with lubridate package
- Strings with stringr package
- iterative opertaions with purrr package
- Data import
- Data transformation cheatsheet with dplyr package
- R Markdown (to create documents like PDF, Word, Powerpoint…)
- Shiny (to build interactive web apps)
- Data visualization with ggplot2 package
- Cartography (GIS)
- leaflet package (interactive maps)
- Python with R (reticulate package)
This is an online R resource specifically for Excel users
Topic-Specific Resources
scRNA seq
RMarkdown and Quarto
Plotting
Table Visualization
- The full flextable book is here: https://ardata-fr.github.io/flextable-book/
- The Github site is here
- A manual of all the flextable functions can be found here
- A gallery of beautiful example flextable tables with code can be accessed here
Data manipulation
- The Data Carpentry page on dplyr
- The tidyverse reference pages on group_by() and grouping
- This page on Data manipulation
- Summarize with conditions in dplyr
- A helpful tutorial on pivoting tutorial
- The tidyverse page on joins
- The R for Data Science page on relational data
Surveys
Communities
R has a vibrant twitter community where you can learn tips, shortcuts, and news - follow these accounts:
- EpiHandbook (makers of the textbook these materials are based on) @epiRhandbook
- R Function A Day @rfuntionaday is an incredible resource
- R for Data Science @rstats4ds
- RStudio @RStudio
- RStudio Tips @rstudiotips
- R-Bloggers @Rbloggers
- R-ladies @RLadiesGlobal
- Hadley Wickham @hadleywickham
Also:
#epitwitter and #rstats
Free online resources
A definitive text is the R for Data Science book by Garrett Grolemund and Hadley Wickham
The R4Epis project website aims to “develop standardised data cleaning, analysis and reporting tools to cover common types of outbreaks and population-based surveys that would be conducted in an MSF emergency response setting.” You can find R basics training materials, templates for RMarkdown reports on outbreaks and surveys, and tutorials to help you set them up.