A Modular Platform for Reproducible Modeling of Species Niches and Distributions

The 'shiny' application 'wallace' is a modular platform for reproducible modeling of species niches and distributions. 'wallace' guides users through a complete analysis, from the acquisition of species occurrence and environmental data to visualizing model predictions on an interactive map, thus bundling complex workflows into a single, streamlined interface.

Build Status License: GPL v3 CRAN version downloads

Wallace is a modular platform for reproducible modeling of species niches and distributions, written in R. The application guides users through a complete analysis, from the acquisition of data to visualizing model predictions on an interactive map, thus bundling complex workflows into a single, streamlined interface. ß Install Wallace via CRAN and run the application with the following R code.


Development versions can be downloaded from Github with the following R code.


Before using Wallace

Update R and RStudio versions

Please make sure you have installed the latest versions of both R (Mac OS, Windows) and RStudio (Mac OS / Windows: choose the free version).

Download maxent.jar

Wallace uses the maxent() function in the package dismo. This function requires the user to place the maxent.jar file in the /java directory of the dismo package root folder. You can download Maxent here, and locate maxent.jar, which is the Maxent program itself, in the downloaded folder. You can find the directory path to dismo/java by running system.file('java', package="dismo") at the R console. Simply copy maxent.jar and paste it into this folder. If you try to run Maxent in Wallace without the file in place, you will get a warning message in the log window and Maxent will not run.

Potential Issues

rJava and Java versions

Wallace uses the rJava package to run the program maxent.jar. The package rJava will not load properly if the version of Java on your computer (32-bit or 64-bit) does not match that of the R installation you are using. For example, if you are running 64-bit R, please make sure your Java is also 64-bit, or else rJava will be unable to load. Install the latest version of Java here, and 64-bit Windows users should make sure to select "Windows Offline (64-bit)". There is currently only a 64-bit download for Mac OS. For Mac users running OSX Yosemite and above with problems, see this StackOverflow post for some tips on how to get rJava working again. If you need to install Java for the first time, you can follow these instructions for Mac and Windows.

Problems viewing tables

If for some reason you are unable to view the tables in Wallace, please install (force if necessary) the development version of htmlwidgets by running this code: devtools::install_github("ramnathv/htmlwidgets"). You should be able to view tables now.

Windows Users: PDF download of session code

If PDF downloading of session code is not working for you, please follow the following instructions, taken from here: - Step 1: Download and Install MiKTeX from http://miktex.org/2.9/setup - Step 2: Run Sys.getenv("PATH") in R studio. This command returns the path where Rstudio is trying to find pdflatex.exe. In Windows (64-bit), it should return "C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe". If pdflatex.exe is not located in this location Rstudio gives this error code 41. - Step 3: To set this path variable run: Sys.setenv(PATH=paste(Sys.getenv("PATH"),"C:/Program Files/MiKTeX 2.9/miktex/bin/x64/",sep=";")).

Windows Users: Only for Github installation

If you are using Windows, please download and install RTools before installing the devtools package. After you install RTools, please make sure you add "C:\Rtools\bin" to your PATH variable (instructions here). Additionally, when using devtools on Windows machines, there is a known bug that sometimes results in the inability to download all package dependencies. If this happens to you, please run this script to install the packages and their dependencies directly from CRAN, and then run the code below.

Any other problems with install_github()

Although the recommended way to install is through CRAN, if you are trying to install the Github version and are having problems, follow these steps.

  1. Download the zip file from the repository page.
  2. Unzip and open the wallace.Rproj file in RStudio.
  3. In the right-hand pane, click Build, then Build & Reload.
  4. Type run_wallace() in the console and press Enter.


wallace 1.0.6

  • Wallace no longer needs rJava to run! Oh happy days! Wallace is now compatible with ENMeval 0.3.0, which now has no rJava dependency and runs Maxent using maxnet by default (CRAN package maxnet; https://onlinelibrary.wiley.com/doi/abs/10.1111/ecog.03049). This means Wallace no longer loads rJava automatically when using the ENMeval partition functions or running Maxent. You can still select the Java implementation of Maxent by choosing "maxent.jar" in the Maxent module, whereupon rJava will load.
  • Wallace now works on computers that error when some non-ASCII characters are used. This problem was discovered during a workshop in Vietnam on some Chinese computers.
  • Users can now select bioclimatic variables when using 30 arc second data.
  • Added more instructions on how to troubleshoot installing rJava.
  • Occurrence points with NA environmental values now disappear from the map.
  • We also fixed some other small bugs dealing with the shiny code and Markdown file.
  • The MESS map has a new color ramp that should make it easier to distinguish between positive and negative values.
  • The unit tests (including those for RSelenium) are now only located in the Github repository version of Wallace. We will introduce new unit tests in a later version that will be integrated into the CRAN Wallace version.
  • Small changes in text guidance for modules and components.

wallace 1.0.5

  • A brand new vignette was finally added to our website. Please find it here: https://wallaceecomod.github.io/vignettes/wallace_vignette.html
  • Methods in Ecology and Evolution paper published in April 2018 -- DOI remains the same.
  • The lambdas file for each Maxent model can now be viewed in a subtab of Results.
  • Projections in the Project component no longer overlap with map predictions from the Visualize component.
  • Added more options to Draw toolbar to allow users to erase drawn polygons. Until leaflet.extras enables programmatic removal of drawn polygons again, the Reset button will only reset the data, and not affect polygons.
  • Pagination was added back to the model results table.
  • Enabled download of the model results table as .csv.
  • Removed the pop-up field from the occurrence table for downloads.
  • Fixed a problem with downloading rasters as .png.
  • Fixed bug that made the app crash if Project is selected after pressing Reset to remove the polygon in the Project component.
  • There is now a check to see that rgdal is installed before downloads of rasters are allowed. This turns out to be an issue with raster package, as the rgdal dependency for this function doesn't seem to be functional.
  • The slider for regularization multipliers is now restricted to a minimum of 0.5, and is able to be set to increments of 0.5. An RM value of 0 caused errors for Hinge models, and it's not clear whether RM of 0 is recommendable for other FCs, so it was removed.
  • In the highly improbable case users select all points in the Select Occs module, the app now does not crash, and instead informs the user to select a subset instead.

wallace 1.0.4

  • Fixed the mapped display for the user-drawn polygon in Module: Select Occurrences On Map so that it remains displayed after the Finish button is pressed.
  • Changed all system.file() calls to files in the wallace package to relative paths, which ensures that in those cases where the user downloads from Github and doesn't have the package installed from CRAN, or the package being developed is not the one installed from CRAN, the correct files can be found. To make this work, the folders inst/Rmd, inst/css, and inst/js have been moved to inst/shiny. An exception is the run_wallace() function, which retains system.file() because it is not in the inst/shiny folder.
  • Fixed the intro tab text formatting and added a bulleted list.
  • Minor changes to simplify code.
  • Added link to DOI of Early View manuscript in MEE.

wallace 1.0.3

  • Added error checks for when the coordinate reference system (CRS) of an input user raster is NA, and updated guidance text in the User-specified Environmental Data module with a guide on configuring the CRS of rasters in R.
  • Fixed a bug that prevented downloads of 30 arcsec Worldclim rasters.
  • Updated the intro screen tab module names.

wallace 1.0.2

  • There is now an option to download all the response curves at once in the same png.
  • Local path to dismo's maxent.jar is now printed inside the log window to avoid failure to word wrap in some browsers.
  • Component 2 module "Select Occs" now informs user of the occIDs of points removed, not of the ones retained.

wallace 1.0.1

  • Removed button used for development.

wallace 1.0.0

  • Biggest change: reprogrammed most of the software to integrate shiny modules. Now each module is a separate script in /inst/shiny/modules that contains both UI and server logic. This should make authorship and integration of new modules much easier.
  • Second biggest change: integrated leaflet draw toolbar functionality from leaflet.extras package, which replaces the previous code to draw and internally record polygons in comps 2 and 7. The code is much cleaner now and easier to make edits to.
  • By popular demand, added user-input environmental variables module. This is a work in progress, so please report bugs to Issues on Github.
  • Added buffer by points feature for background extent module (comp4).
  • Added cloglog output option for Maxent (updated for Maxent version 3.4x) in map prediction module (comp7).
  • Partition occurrences modules (comp5) now plot on the map with a legend showing the partition group per color.
  • Maxent models now show the evaluation statistics for all partition groups (ENMevaluate() option bin.output=TRUE) -- the partition group numbers correspond to the comp5 legend.
  • Unit tests are now available for all modules in two flavors: 1) control tests run automatically via Travis with each Github push, which test that the UI buttons, forms, etc. are functioning properly; and 2) function tests which run Wallace as a user would by pushing buttons and entering fields, and as these tests take more than 5 minutes to complete, they are not automatically run for now. Unit tests will be a signature part of module contribution.
  • Updated guidance text.

wallace 0.6.4

  • Added explicit package references to writeRaster() calls. Should work now without loading raster package first.
  • Fixed reference to required field names in component 1 User Occurrences module guidance text. Now reads "names" instead of "species" as first field.
  • Added checks for appropriate fields for VertNet and BISON, as not all downloads include all fields. Should avoid erroring due to missing fields now.

wallace 0.6.3

  • Added repmis and rgdal to package dependencies.
  • Turned off evaluation of chunk that loads packages in userReport.Rmd.
  • Added error catches to component 5 and 6 if rJava cannot load.

wallace 0.6.2

  • Turned off evaluation of code chunks in userReport.Rmd. Now the building of user session code is much, much faster.
  • Made code compatible with leaflet version 1.0.1. There was a mysterious problem with zooming to points before clearing markers and/or plotting points, which resulted in crashing as soon as points are plotted unless the user had the Github master version of leaflet installed. Thus the code was rearranged and cleaned to accomodate the current leaflet version on CRAN.
  • Fixed some errors in userReport.Rmd relating to the user .csv path and printing of a couple of headings.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.1.0 by Gonzalo E. Pinilla-Buitrago, 5 months ago


Browse source code at https://github.com/cran/wallace

Authors: Jamie M. Kass [aut] , Gonzalo E. Pinilla-Buitrago [aut, cre] , Bruno Vilela [aut] , Matthew E. Aiello-Lammens [aut] , Robert Muscarella [aut] , Cory Merow [aut] , Robert P. Anderson [aut]

Documentation:   PDF Manual  

GPL-3 license

Imports dismo, dplyr, DT, ENMeval, jsonlite, leaflet.extras, magrittr, raster, RColorBrewer, rgeos, rgdal, rmarkdown, shinyjs, shinythemes, sp, spocc, spThin, zip

Depends on leaflet, shiny

Suggests knitr, rgbif, testthat, XML

See at CRAN