-
Go to https://rstudio.cloud/spaces/20603/join?access_code=loFjFYH4SU4q9uQX5Ymqkd6reLjK9vlbkXAMyeFX
-
Create an account or Log in with Google or GitHub
-
Click on “Join Space”
-
Click on “Projects” at the top
-
Click on “New Project” and wait while “Deploying project” completes
Download and install the latest version of R from:
https://www.stats.bris.ac.uk/R/
Windows: Download R for Windows
- base
- Download R 3.6.0 for Windows
Mac: Download R for (Mac) OS X
- R-3.6.0.pkg
Then download and install RStudio:
https://www.rstudio.com/products/rstudio/download/#download
Windows: RStudio 1.2.1335 - Windows 7+
Mac: RStudio 1.2.1335 - Mac OS X 10.12+ (64-bit)
healthyr_notebooks = c("tidyverse", "boot", "finalfit", "flexdashboard", "gapminder", "here", "kableExtra", "knitr", "remotes", "rmarkdown", "shiny", "survminer", "tinytex")
install.packages(healthyr_notebooks)
remotes::install_github("thomasp85/patchwork")
tinytex::install_tinytex()
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:
tinytex:::is_tinytex()
# If installed should return `TRUE`.
# Notice the triple colon, this is because it's an internal variable name.
-
~"can't find remotes": try doing step 3.2 (restart) again. We only just installed
remotes::
in 3.1 so RStudio needs a restart before we can start using it. -
~"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.
- Click on
Clone or download
thenDownload ZIP
(top-right of this GitHub page) - Unzip the folder and rename it to just healthyr (so from
healthyr_notebooks_materials-master
tohealthyr
). - 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).
- Open RStudio. Click on New Project.
- Select "Existing Directory".
- Browse to find your
healthyr
folder, thenCreate Project
. - Click on the
01_introduction
folder in the Files pane (bottom-right), then open01_introduction.Rmd
.