Skip to content
grantbrown edited this page Dec 22, 2014 · 13 revisions
  1. Linux ============================== Ubuntu 14.04.1 - Tested @ 7a2b7d59

The following packages are required:

  • git
  • cmake
  • libboost-dev
  • libboost-random-dev
  • r-base-core
  • r-base-dev

If you have administrator access, these can be installed by running:

sudo apt-get install git cmake libboost-dev libboost-random-dev r-base-core r-base-dev

If you do not have permission to install these dependencies, your best bet is to contact your system administrator. The package can be built without boost, relying instead on the underlying C code behind R, but this option is both more difficult to set up and slower to run.

Next, you'll need to install the Rcpp and coda R packages. From the command line you can start R and install the packages in the usual way:

R
>install.packages(c("Rcpp", "coda"))

Then you're ready to clone a copy of the libSpatialSEIR repository and install the associated R package. Change to the directory you'd like to create the libSpatialSEIR project folder in and type:

git clone https://github.com/grantbrown/libspatialSEIR.git --recursive
cd libspatialSEIR/R/release_package
./install.sh

If everything went according to plan, you should be ready to use the library. Note that if you later pull additional changes from the repository, you'll need to remove the libspatialSEIR/R/release_package/src folder before running the installation script again.

  1. Mac OSX ==============================

Pending.

  1. Windows 7 ============================== Windows support is developing rapidly, so these instructions are likely to change. In addition, libSpatialSEIR performance and stability may be poorer than on Linux systems, as it is far less thoroughly tested.

The first step is to download git from this site. Just keep the default options presented during the installer.

Next, make sure that you have the most recent version of R installed. Here's a link to the 3.1.1 Windows binary.

With R installed, you'll need to install a version of Rtools, which are additional tools which enable the building of R and its associated packages. Here's the Rtools binary for the above version of R. More information can be found here. During the installation, check the box in the "Select Additional Tasks" tab which is labeled "Edit the system Path". Make sure that the path value includes the Rtools binary folders.

The next step is to install the Rcpp and coda libraries. Open R, and type:

install.packages(c("Rcpp", "coda"))

Next, we need to clone a copy of the libSpatialSEIR repository. Once the Windows version is finalized, I'll simply provide a zip file which will avoid the need for this step. Open "git bash" from the start menu. Change directiory to the location where you'd like to save the libSpatialSEIR source files. If you don't know how to do this, just type:

cd ~/Documents

Next type:

git clone https://github.com/grantbrown/libspatialSEIR.git --recursive

The next step requires us to call R from the command line, but by default R does not add its executable to the system path. Open the start menu and type "environment variables", then click on the item "Edit the System Environment Variables". Towards the bottom right of the dialogue, click the "Environment Variables" button. Find the "System variables" entry called "Path", select it, and click "Edit". At the very beginning of the "Variable value" text box, add the text:

c:\Program Files\R\R-3.1.1\bin;

If your R installation path is different, adjust it accordingly. Click "Ok" to exit the open dialogues.

Open the start menu again, and type "cmd" followed by the enter button. This will open a command prompt. Navigate to the R/release_package folder in the libspatialSEIR directory. For example:

cd Documents\libspatialSEIR\R\release_package

Now run the install script:

install_win.bat

The package should now be compiled and installed. This may take awhile, but after it finishes without errors you should be able to use the library.

Clone this wiki locally