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.
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.
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.
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.
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.
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=";")).
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.
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.
run_wallace()in the console and press Enter.
leaflet.extrasenables programmatic removal of drawn polygons again, the Reset button will only reset the data, and not affect polygons.
rgdalis installed before downloads of rasters are allowed. This turns out to be an issue with
rasterpackage, as the
rgdaldependency for this function doesn't seem to be functional.
system.file()calls to files in the
wallacepackage 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/jshave been moved to
inst/shiny. An exception is the
run_wallace()function, which retains
system.file()because it is not in the
rgdalto package dependencies.
leafletversion 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
leafletinstalled. Thus the code was rearranged and cleaned to accomodate the current
leafletversion on CRAN.