Prerequisites
Last updated: November 20th, 2025
Prior knowledge
We do not assume any prior knowledge of R pacakge development, but basic knowledge of R is expected. In particular, participants should be confident writing functions. Some experience with RStudio is beneficial.
Two of the modules from the Warwick-Stats-Resources R Foundations course covers the required material:
Git and GitHub
You will need Git installed on your computer and a GitHub account.
- To install Git: see https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
- If you do not have a GitHub account, go to https://github.com and click ‘Sign up’ in the top right-hand corner, then fill in the required information
Although there will be some time dedicated to this in the workshop, it would be advantageous if you already have a GitHub PAT configured to work with RStudio – the vignette from the usethis package on Managing Git(Hub) Credentials goes through this.
R and RStudio
Please ensure that you have the latest versions of R and RStudio installed prior to the first session. Currently, that’s R-4.5.2 and RStudio-2025.09.2.
We also strongly recommend all participants install the development tools to avoid potential issues installing packages.
Installing R
Download the pre-compiled binary for your OS from https://cloud.r-project.org/ and install. More specifically:
For Windows
Click “Download R for Windows”, then “base”, then “Download R-4.5.2 for Windows”. This will download an .exe file; once downloaded, open to start the installation.
For Mac
Click “Download R for macOS”, then “R-4.5.2-arm64.pkg” (the first option) to download the installer for Macs with Apple Silicon chips or “R-4.5.2-x86_64.pkg” (the second option) to download the installer for Macs with Intel chips. Run the installer to complete installation.
For Linux
Click “Download R for Linux”. Instructions on installing are given for Debian, Fedora, Redhat, Suse and Ubuntu distributions. Where there is a choice, install both r-base and r-base-dev.
Installing R Studio Desktop (Open Source Edition)
Downloads are available from https://posit.co/download/rstudio-desktop/
Download the relevant installer either under the “Install RStudio” header or, scrolling down the page, from the ‘All installers and Tarballs’ section. Run the installer to complete installation.
For Windows with no admin rights
Download the .zip source archive under “Zip/Tarballs”. Extract the files to a folder where you have write access, e.g. C:\Users\username\RStudio. In this folder, open the bin directory and find the RStudio program: it is named rstudio.exe, but the file extension will typically be hidden, so look for rstudio. Right-click this executable to create a desktop shortcut. Double-click the executable or use the shortcut to open.
For all other operating systems
Download the relevant installer for your operating system. You should see this under “2: Install RStudio”, or else under “All Installers and Tarballs”. Run the installer to complete installation.
Development Tools
Some additional tools may be required to compile R packages from source.
For Windows with no admin rights
Download the latest (recommended) Rtools installer, Rtools.exe, from https://cran.r-project.org/bin/windows/Rtools/. Run the installer keeping the default settings.
For Windows with admin rights
Download the latest Rtools installer, Rtools.exe, from https://cran.r-project.org/bin/windows/Rtools/. Run the installer making the following selections: keep the default settings for the installation location and components to install; check the box to add rtools to the system PATH.
For Mac
Either install XCode:
- Download and install XCode from the Mac AppStore: http://itunes.apple.com/us/app/xcode/id497799835?mt=12
Or for a smaller download size:
- Register as an Apple Developer (free) here: https://developer.apple.com/programs/enroll/
- Download the Command Line Tools for XCode appropriate for the version of OS X you are running from here: https://developer.apple.com/downloads/
For Linux
If you installed r-base-dev, when installing R, you should have all you need to build packages from source. Otherwise return to the instructions for installing R for your distribution and follow the instructions there to install the additional tools.
Required packages
Please install the latest version of the devtools package, v2.4.6:
install.packages("devtools")