2.5.   Install R and RStudio on your local computer

As with all the other software installations for use in data cleaning, first check which versions are recommended at present.

  • Installation instructions for R on Windows and Mac can be found here: cran.rstudio.com.

  • Installation instructions for RStudio on Windows and Mac: posit.co/download/rstudio-desktop.

  • Any packages that you need and do not already have will be automatically installed by our pipeline scripts.

  • Next, install the following libraries in RStudio by running the code below. Note this code will only install packages that you don’t already have installed:

packages <- c("tidyverse", "caret", "REddyProc", "dplyr", "lubridate", "data.table", "fs", "yaml", "rlist", "zoo", "reshape2", "stringr", "ranger", "caret", "ggplot2")
  
installed_packages <- packages %in% rownames(installed.packages())
  if (any(installed_packages == FALSE)) {
    install.packages(packages[!installed_packages])
  }