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.
Download and run the R installer (as administrator!) from https://cran.r-project.org/bin/windows/base.
(Optional) To build and compile packages, download and install the latest Rtools (as administrator!) from https://cran.r-project.org/bin/windows/Rtools/. Be sure to check the “add rtools to PATH” option during installation.
Install GIS tools by downloading OSGeo4W from http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe and running the installer (select ‘Express Install’).
Download and run the R installer from https://cran.r-project.org/bin/macosx.
Install Xcode commandline tools from the terminal:
Install homebrew from the terminal (more info at https://brew.sh/):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
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 http://stackoverflow.com/a/26836125/1380598 install.packages("rgdal", type = "source", configure.args = c("--with-proj-include=/usr/local/include", "--with-proj-lib=/usr/local/lib")) library(rgdal) ## confirm the GDAL version being used
Install OpenMP support for
brew install llvm
Install GLPK (needed for full
brew install glpk
igraph from source so it is compiled with GLPK:
install.packages("igraph", type = "source")
yum depending on your distribution. Instructions for Ubuntu 20.04 LTS are shown below.
Install R and its development libraries:
sudo apt install r-base r-base-dev
Install java and configure R to use it:
sudo apt build-dep -y r-cran-rjava sudo R CMD javareconf
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 \ tk-dev
Download and run the installer for your operating system from https://www.rstudio.com/products/rstudio/download/#download.