bcss
home

Software required for "Boot Camp" in wildlife study design and data analysis

 

If you are using a computer which belongs to your organisation and you have to get your IT colleagues to install the software for the workshop please ask them to go to either http://bcss.org.my/software/ or http://bcssmalaysia.org.my/software/ (they should be identical).

Participants are asked to bring a laptop computer to the workshops.

Windows (7, 8 or 10), Mac (Mavericks or later), or Ubuntu (Trusty or Xenial - the LTS versions) all work. Other Linux distros should also work, but we have not tried. Our code has been most thoroughly tested on Windows machines.

They will need the following applications installed:

  • R statistical software, version 3.4.1 or later; see below.
     
  • JAGS application, version 4.2.0 or later; see below.
     
  • A spreadsheet application with the Solver add-in, either MS Excel 2010 or later or LibreOffice Calc. Don't use Kingsoft WPS software, as their Solver doesn't work properly.
     
  • A PDF reader which allows the file to be annotated, eg, with 'stickies'.

Your operating system

Windows: Everything usually works fine out of the box on Windows 7 or later (NOT on Windows XP or Vista).

On recent versions of Windows, the path to the userís Documents directory is typically C:/Users/<username>/Documents and the temporary directory is at C:/Users/<username>/AppData/Local/Temp. We have had issues with certain R functions where
   1. the userís area was configured on a network drive, even though the actual location was on the local machine;
   2. the <username> included CJK (Chinese-Japanese-Korean) characters.
Please ensure that the set up is typical with all-ascii characters in the path. If necessary, please set up a new user account for use during the workshop.

After installing R, you can check this by running

tempdir() ; Sys.getenv("R_USER")

If "\\\\" or non-Western characters or unicode hex values (eg, <U+611B>) appear in the output, some R functions will fail.

Apple Mac OS X: The latest versions of R and JAGS are only available for 10.9 (Mavericks) or later. If you have a 'big cat' version, please upgrade.

Old versions which run on 10.6 Ė 10.8 are still available for download, but they are not compatible with other packages we need to run.

You will need the XQuartz utility; install this if necessary.

Ubuntu and other Linux distros: R 3.3.0 and above are no longer supported for Ubuntu 12.04 (Precise). The versions of R and JAGS on the official repositories are not up to date, and may not even be cross-compatible. If you use Ubuntu, go here for a method to install R and JAGS and the rjags package, ensuring compatibility. For other distros, please check the installation instructions on the R and JAGS web sites (links below).

R statistical software:

This is free, open-source software. It works across all platforms.

If you have a version prior to 3.4.1, please update. Version 3.4 is faster than 3.3 and 3.4.0 had a couple of bugs. Uninstall the old version before installing the new version. (On Windows, you can have multiple versions installed, but the user will run into compatibility issues if they start an old version by mistake.)

Downloads are available for Windows and Mac OS X Mavericks or later. For Ubuntu, see here for a quick way to install both R and JAGS. For other Linux distros, instructions are here.

Mac users may get a slew of warnings when they open R, eg, Setting LC_CTYPE failed, using "C". These need to be fixed or packages will not load! See the help topic referenced in the warning message or go here.

JAGS

This is also free, open-source software which works across all platforms. If you have a version prior to 4.2.0, please uninstall and install the new version (currently 4.3.0).

All operating systems: look for the latest version download link just below the menu bar here. If that is not the version you want, use the links further down the page. Completely uninstall the old version of JAGS first.

Windows: Version 4.3.0 resolves compatibility issues with different R versions that were a problem with 4.2.0.

Mac: Downloads for Mac OS X (Mavericks or later) are here.

Linux: For Ubuntu, see here. For other Linux distros, go here and look at the Downloads section at the end; there's info on installing from source here.

JAGS does not appear in the Applications lists on Macs or Ubuntu. To check that it is installed properly and to see the version, open the Terminal and type "jags".

After installing R and JAGS, install the rjags package in R (see below) and check that you can load it without errors.

R packages

Installation of R packages (aka add-ins aka plug-ins) does not require administrator privileges. They are stored in the user's area (Windows default: C:/Users/<username>/Documents/R/win-library). The packages we need are available from CRAN and can be installed over the internet from within R.

The procedure is the same for all platforms.

rjags package: Open R and type (or copy-paste)

install.packages("rjags")

and press Enter/Return. A box may pop up asking about personal libraries: click Yes. You will need to select a mirror web site near you, or choose 0-cloud, which is a world-wide network.

If you get a message asking "Do you want to install from sources...", just type "n" and press enter.

Check everything works! Open R and load rjags with

library(rjags)

You should get a message saying "Linked to JAGS 4.x.x". If you get an error message, the most likely cause is a mismatch between the versions of JAGS and rjags; current versions of rjags (4-6 or later) need JAGS version 4.0.0 or later. On Mac and Linux systems, mysterious errors arise if components of JAGS 3 are still on the system.

Other R packages: Open R and copy/paste the following line into the Console:

install.packages(c("wiqid", "shiny", "secr", "beeswarm"))

If you get a message asking "Do you want to install from sources...", just type "n" and press enter. (This arises when source code for a new version is uploaded but the binaries have not yet been updated.)

Fourteen other packages on which the above four depend will also be downloaded and installed, 18MB in all.

If you have problems installing R packages, don't worry: we can fix this at the beginning of the workshop.

Feedback

If you have suggestions, comments or questions about installing the software needed for the workshop please email stats.bcss@gmail.com.

 

Page updated 13 August 2017 by Mike Meredith