Skip to content
Switch branches/tags

Getting started:

Create a free RStudio Cloud account and take a copy of the HealthyR Notebooks project following this link:

  1. Create an account
  2. Click on "Take a permanent copy" at
  3. Click on the 01_introduction folder in the Files pane (bottom-right), then open 01_introduction.Rmd


  1. Installing R
  2. Installing RStudio
  3. Installing R packages:
  4. Exploring RStudio:
  5. Welcome to R:
  6. RStudio Projects:
  7. Importing CSV files:
  8. Importing Excel files:
  9. Exploring data:
  10. Preparing data:
  11. Tidying data:

All videos:

For offline use, follow the steps below to install everything on your own computer:

1. R

Download and install the latest version of R from:

Mac: Download R for (Mac) OS X - R-3.6.X.pkg

Windows: Download R for Windows - base

2. RStudio

Then download and install RStudio:

3. R packages

3.1 Open RStudio and copy-paste the lines below into the Console and press Enter:

healthyr_notebooks = c("tidyverse", "boot", "finalfit", "flexdashboard",
"gapminder", "here", "kableExtra", "knitr", "remotes",
"rmarkdown", "shiny", "survminer", "tinytex", "patchwork")

3.2 Then Restart R

3.3 to then run this this line (same as before, copy-paste to the Console):


If it asks you "Do you want to restart your R session", press Yes the first time. If it immediately asks again, press No.

Code to check tinyTex and Tex working as expected:


#  If installed should return `TRUE`.
# Notice the triple colon, this is because it's an internal variable name.


~"TeX failed, you already have a TeX distribution...". If you already have LaTex installed on your computer, the tinytex::install_tinytex() one is not necessary and might not work. This is fine, there is no harm in copy-pasting in anyway if you are not sure.

WARNING: Rtools is required to build R packages, but is not currently installed.

Some packages need a little extra help on installation. This can happen if the package developer hasn't uploaded the Windows binaries to CRAN, or if you're installing directly from GitHub. Mac's have this capability built in, whereas Windows users will have to install RTools before trying to install package again:

4. Set up course materials

  1. Click on Clone or download then Download ZIP (top-right of this GitHub page)
  2. Unzip the folder and rename it to just healthyr (so from healthyr_notebooks_materials-master to healthyr).
  3. Move this folder to where you will be keeping your R projects. Each RStudio project is in a separate folder, but you can always move them afterwards (e.g. into a new folder called R-projects).
  4. Open RStudio. Click on New Project.
  5. Select "Existing Directory".
  6. Browse to find your healthyr folder, then Create Project.
  7. Click on the 01_introduction folder in the Files pane (bottom-right), then open 01_introduction.Rmd.


Scroll down this page for installation instructions, or see this poster:







No packages published