System Setup 🤖
You will require the following software installed and configured for the workshop. Please have this set up and ready to go before we start.
Computing requirements
You will need:
- A laptop computer with administrative privileges
- R and RStudio
- R package development toolchain
- Several R packages
- Git
- GitHub account
Install R and RStudio
You will need:
- R version >= 4.4.0
- RStudio >= 2024.04 or Positron >= 2025.09.0-139
Install R
Download and install R for your operating system from https://cloud.r-project.org/.
Install R Studio
Download and install RStudio Desktop from https://posit.co/download/rstudio-desktop/. This page should automatically offer you the version suitable for your operating system, but you can scroll down to find versions for all operating systems.
Install Positron
Download and install Positron from https://positron.posit.co/download.html. This page should automatically offer you the version suitable for your operating system, but you can scroll down to find versions for all operating systems.
Install R package development tools
For Windows
Download and run the latest Rtools installer, Rtools.exe, from https://cran.r-project.org/bin/windows/Rtools/.
- Keep the default settings for the installation location and components to install
- check the box to add rtools to the system PATH.
For Mac
Install XCode. The easiest way is to open a Terminal window (Applications > Utilities > Terminal.app; or use the Terminal pane in RStudio) and type the following:
xcode-select --install
You will be prompted to confirm the install, and possibly enter your computer password. Do so to complete the installation.
Alternatively you can:
- Download and install XCode from the Mac AppStore: http://itunes.apple.com/us/app/xcode/id497799835?mt=12
- Within XCode go to Preferences : Downloads and install the Command Line Tools
For Linux
If you installed r-base-dev when installing R, you should have all you need to build packages from source. If not, go back to https://cloud.r-project.org/ and follow the instructions for your distribution (Ubuntu and Debian are likely the most common, and install it with sudo apt-get install r-base-dev).
Git
We will be learning the use of Git and GitHub for version control and collaboration.
Windows
Check if Git is installed by running which git in the Terminal pane in RStudio.
If which git didn’t find Git installed:
- Download and install from https://git-scm.com/downloads
- Keep all the default settings. If asked about “Adjusting your PATH environment”, make sure to select “Git from the command line and also from 3rd-party software”.
RStudio + Git
- Open RStudio. In the menus go to Tools > Global Options > Git/SVN.
- Check RStudio has found git under “Git executable”. If it hasn’t:
- You may need to click Browse and find the git executable.
- It may be in
C:/Users/[username]/AppData/Local/Programs/Git/
Positron + Git
- Positron is smart about finding git, but if it doesn’t find it automatically:
- In the menu go to File > Preferences > Settings.
- Search for “Git Path”.
- Click “Edit in settings.json” and add the path to the git executable.
- It may be in
C:/Users/[username]/AppData/Local/Programs/Git/cmd/git.exe
Mac
Check if Git is installed by running which git in the Terminal. You should see something like /usr/bin/git, /usr/local/bin/, or /opt/homebrew/bin/git.
If you are asked to install the Xcode command line tools, say yes.
If which git didn’t find Git installed, and if you weren’t prompted to install it, run the following in the Terminal: xcode-select --install
If you do lots of scientific computing and especially if you use command-line programs in the Terminal, we recommend using Homebrew. See brew.sh for installation instructions. To install Git using Homebrew, run the following in the Terminal: brew install git
GitHub
Register a GitHub account at github.com.
I highly recommend the book Happy Git with R for advice on setting up and using Git with R [@bryan].
Troubleshooting
If you are having issues with the setup please start a discussion on GitHub here.