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

RMarkdown and Quarto

R Markdown is a widely-used tool for creating automated, reproducible, and share-worthy outputs, such as reports. It can generate static or interactive outputs, in Word, pdf, html, powerpoint, and other formats.

An R Markdown script intersperces R code and text such that the script actually becomes your output document. You can create an entire formatted document, including narrative text (can be dynamic to change based on your data), tables, figures, bullets/numbers, bibliographies, etc.

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

Regression

Surveys

Communities

Twitter

R has a vibrant twitter community where you can learn tips, shortcuts, and news - follow these accounts:

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.

Languages other than English

Materiales de RStudio en Español

Introduction à R et au tidyverse (Francais)