Installing the raadtools package

NOTE: this is out of date, and currently in review. MDS 2016-09-10

This document is currently relevant to working on Windows, much of the same stuff will work on Linux but no care has been taken to point out the differences here.

Setup

To install the raadtools package from within the AAD you should be able to run the following code from within R. A relatively recent version of R will be assumed, and definitely no earler than R 2.15.0 can be expected to work.

This is the basic full install and configuration, see below for each step in greater detail.

install.packages(c("maptools", "raster", "testthat", "ncdf", "rgdal", "rgeos", "knitr"),
                 dependencies = TRUE)
devtools::install_github("AustralianAntarcticDivision/raadtools")

Now to load the package, use the usual package loading code here. If there is a problem with determining the path to the data repository this will provide a message about that.

If a message reports that your data repository cannot be found, follow the instructions to set it and send this package author your details.

The instructions go like this, by setting an option called default.datadir, note that this only sets this for the current R session and you will have to repeat it each time until a better solution is developed.

options(default.datadir = "/path/to/repository/of/data")

(The tip of the path there “data” should include files such as “chl”, “wind”, “sst”, etc. i.e. it looks like data/chl, data/wind, data/sst which hold the individual families of the main data types).

Setup details

The remaining text in this section repeats the installation steps above individually, this might be required for customized installations or development.

If the following step fails you may not have your network settings setup appropriately, so first run setInternet2 and then try to install raster again. (This option can be set for an R installation by choosing “Internet2” when R is installed, and this is what you should do. Otherwise, R is launced with “Rgui.exe” and this can be invoked with the option to setInternet2 by using Rgui.exe –internet2 which can be set on a Windows shortcut under Properties).

setInternet2(TRUE)
install.packages(c("raster", "maptools"))

The following packages are not essential to run raadtools but otherwise some features will not be available. To get the full functionality please do run the following installations as well.

install.packages("ncdf", "rgdal", "rgeos", "devtools", "testthat")

Finally, install the latest version of the package.

devtools::install_github("AustralianAntarcticDivision/raadtools")

Development of raadtools

Process of committing changes to the Git source of raadtools

The raadtools package source is hosted on GithHub.

https://github.com/AustralianAntarcticDivision/raadtools

Install prerequisites for building raadtools

  1. Install the most recent version of R, and set its location in your PATH.
  2. Install RTools relevant to the latest version of R, and elect that it sets its location in your PATH (the installer can do this).
  3. Install MikTeX and ensure it is in your PATH (later versions do this on install).
  4. Install the full list of package dependencies listed above.