bcss home |
Software required for BCSS workshops and tutorials |
Participants are asked to bring to the workshop a laptop computer
with R and JAGS installed. This page provides additional information on installing and updating the software required. Participants are required to download and install all software and check that it works before coming to the workshop. You will need the following applications installed:
Your operating systemWindows (8 or later), Mac (El Capitan or later), or Ubuntu (Xenial or Bionic or Focal) all work. Other Linux distros should also work, but we have not tried. Our code has been most thoroughly tested on Windows machines. Windows: Everything usually works fine out of the box on Windows 8 or later.
On recent versions of Windows, the path to the
user’s Documents directory is typically
(Prior to R 4.2.0, packages were installed in
We have had
issues with certain R functions where After installing R, you can check this by running
If "\\\\" or "//" or non-Western characters or unicode hex values (eg, <U+611B>) appear in the output, some R functions will fail. 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. Alternatively, use the workaround described here. Apple Mac OS X: The latest versions of R and JAGS are only available for 10.13 (High Sierra) or later. If you have an earlier version, please upgrade. Old versions which run on 10.6 – 10.10 are still available for download, but they are not compatible with other packages we need to run. Everything does work on Apple M1 processors, but currently (23 April 2022) some workarounds are needed, see below. 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); only LTS versions are supported; see this blog post for information on installing R on Focal.
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 R statistical softwareThis is free, open-source software. It works across all platforms. Version 4.2.0 was released on 22 April 2022. This is a feature update and likely has bugs! If you have R version 4.1.x already installed, do not update to 4.2 until 4.2.1 appears. If you have a version prior to 4.1.1, please update. Uninstall the old version before installing the new version. (On Windows, you can have multiple versions installed, but you will run into compatibility issues if you start an old version by mistake.) Downloads are available for Windows and Mac OS X El Capitan or later. For Ubuntu, see here for a quick way to install both R and JAGS. For other Linux distros, instructions are here. A separate build of R for the Apple M1 processor is available, but no corresponding build of JAGS (the JAGS team are still experimenting; go here for latest information). The simplest option is to install the Intel (x86-64) version, R-4.1.3.pkg. This works fine on M1, though may be somewhat slower.
Mac users may get a slew of warnings when they open R, eg, Firewalls: For parallel processing, R uses sockets to communicate between processes running on different cores; this usually causes a firewall window to pop up the first time it is used. You need to "Allow access" for R to private networks. JAGSThis is also free, open-source software which works across all platforms. If you have a version prior to 4.3.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: You have a choice of versions: use 4.3.1 if you are using R 4.2.0 or later; use 4.3.0 for earlier versions of R. See here for explanations. 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 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:
The procedure is the same for all platforms.
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 click No or type "n" and press enter. (This arises when source code for a new version is uploaded to CRAN but the binaries have not yet been updated.) On Windows, you will get an error if the version of JAGS does not correspond to the version of R: for R 4.2.0 or later, use JAGS 4.3.1; for earlier versions of R, use JAGS 4.3.0.
Check everything works! Open R and load
You should get a message saying "Linked to JAGS 4.x.x".
If you get the error message Other R packages: Open R and copy/paste the following line into the Console:
If you get a message asking "Do you want to install from sources...", just click No or type "n" and press enter. Many other packages on which the above five 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. FeedbackIf you have suggestions, comments or questions about installing the software needed for the workshop please email workshops@bcss.org.my. |
|
Page updated 12 May 2022 by Mike Meredith |