Getting started

This guide shows how to install all requisite software to easily get started with a new SpaDES project. To run development modules etc., users will need to have installed R, Rstudio and SpaDES.

Installing prerequisites

Installing R

  1. Download and run the R installer (as administrator!) from

  2. (Optional) To build and compile packages, download and install the latest Rtools (as administrator!) from Be sure to check the “add rtools to PATH” option during installation.

  3. Install GIS tools by downloading OSGeo4W from and running the installer (select ‘Express Install’).

  1. Download and run the R installer from

  2. Install Xcode commandline tools from the terminal:

    xcode-select --install
  3. Install homebrew from the terminal (more info at

    /bin/bash -c "$(curl -fsSL"
  4. Install GDAL and other spatial packages:

    brew install pkg-config
    brew install gdal

    Then, install spatial R packages from source to pick up the new GDAL and PROJ libraries:

    ## (re)install spatial packages from source
    install.packages(c("rgeos", "sf", "sp"), type = "source")
    ## rgdal requires some additional configuration to build correctly:
    ##   based on
    install.packages("rgdal", type = "source",
                     configure.args = c("--with-proj-include=/usr/local/include",
    library(rgdal) ## confirm the GDAL version being used
  5. Install OpenMP support for data.table:

    brew install llvm
  6. Install GLPK (needed for full igraph functionality):

    brew install glpk

    Then, reinstall igraph from source so it is compiled with GLPK:

    install.packages("igraph", type = "source")

Install via apt or yum depending on your distribution. Instructions for Ubuntu 20.04 LTS are shown below.

  1. Install R and its development libraries:

    sudo apt install r-base r-base-dev
  2. Install java and configure R to use it:

    sudo apt build-dep -y r-cran-rjava
    sudo R CMD javareconf
  3. Install dependencies for spatial and other packages:

    sudo apt build-dep -y r-cran-tkrplot
    sudo apt-get install -y \
      curl \
      gdal-bin \
      git \
      libcairo2-dev \
      libcurl4-openssl-dev \
      libgdal-dev \
      libgeos-dev \
      libgit2-dev \
      libglpk-dev \
      libgmp-dev \
      libjq-dev \
      libmagick++-dev \
      libproj-dev \
      libprotobuf-dev \
      libprotoc-dev \
      libssh2-1-dev \
      libssl-dev \
      libudunits2-dev \
      libv8-dev \
      libxml2-dev \
      libxt-dev \
      pandoc \
      pandoc-citeproc \
      protobuf-compiler \
      python3-gdal \
      tcl-dev \

Install SpaDES and other packages

  1. Add to your ‘repos’ list via options():

      repos = c(
        predictiveecology = "",
        CRAN = ""
  2. Install Require to facilitate package installation:

  3. Install SpaDES.install to handle subsequent SpaDES package installation:

  4. Install SpaDES and related packages:


Installing Rstudio


Download and run the installer for your operating system from