Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: wallace
Version: 2024.09.18
Date: 2024-09-18
Version: 2024.11.18
Date: 2024-11-18
Title: A Modular Platform for Reproducible Modeling of Species Niches
and Distributions
Description: The 'shiny' application Wallace is a modular platform for
Expand Down Expand Up @@ -44,6 +44,7 @@ Imports:
knitcitations,
leafem,
leaflet.extras (>= 1.0.0),
lwgeom,
magrittr,
maskRangeR,
markdown,
Expand All @@ -58,6 +59,7 @@ Imports:
shinyWidgets (>= 0.6.0),
spocc (>= 1.2.0),
spThin,
stars,
terra (>= 1.6-7),
zip
Suggests:
Expand All @@ -80,7 +82,6 @@ Suggests:
rgbif (>= 3.3.0),
sf,
sp,
stars,
testthat,
tidyselect,
tools
Expand Down
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
[![R-CMD-check](https://github.com/wallaceEcoMod/wallace/workflows/R-CMD-check/badge.svg)](https://github.com/wallaceEcoMod/wallace/actions) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![CRAN version](http://www.r-pkg.org/badges/version/wallace)](https://CRAN.R-project.org/package=wallace) [![downloads](https://cranlogs.r-pkg.org:443/badges/grand-total/wallace?color=orange)](https://cranlogs.r-pkg.org:443/badges/grand-total/wallace?color=orange)

# Wallace (v2024.09.18)
# Wallace (v2024.11.18)
*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.
Developmental versions (such as this branch) can be downloaded from Github with the following R code.

```R
install.packages("wallace")
install.packages("devtools")
devtools::install_github("wallaceEcoMod/wallace@biomodelos")
library(wallace)
run_wallace()
```

Development versions can be downloaded from Github with the following R code.
Alternatively, you can install the CRAN version of *Wallace* and run the application with the following R code.

```R
install.packages("devtools")
devtools::install_github("wallaceEcoMod/wallace")
install.packages("wallace")
library(wallace)
run_wallace()
```



### Before using *Wallace*

#### Update R and RStudio versions
Please make sure you have installed the latest versions of both R (<a href= "https://cran.r-project.org/bin/macosx/" target="_blank">Mac OS</a>, <a href= "https://cran.r-project.org/bin/windows/base/" target="_blank">Windows</a>) and RStudio (<a href= "https://posit.co/download/rstudio-desktop/" target="_blank">Mac OS / Windows</a>: choose the free version).

#### How to run Maxent with maxent.jar
*Wallace* v.2024.09.18 includes two options to run Maxent models: maxnet and maxent.jar. The former, which is an R implementation and fits the model with the package `glmnet`, is now the default and does not require the package `rJava` (see Phillips et al. 2017). The latter, which is the Java implementation, runs 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 <a href="https://biodiversityinformatics.amnh.org/open_source/maxent/" target="_blank">here</a>, 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* v.2024.11.18 includes two options to run Maxent models: maxnet and maxent.jar. The former, which is an R implementation and fits the model with the package `glmnet`, is now the default and does not require the package `rJava` (see Phillips et al. 2017). The latter, which is the Java implementation, runs 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 <a href="https://biodiversityinformatics.amnh.org/open_source/maxent/" target="_blank">here</a>, 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

#### changeRangeR off CRAN
As of 2024-07-26, `changerangeR` is temporarily off CRAN. You will have to install it prior to the installation of Wallace.
```R
install.packages("devtools")
devtools::install_github("wallaceEcoMod/changeRangeR")
library(wallace)
run_wallace()
```

#### rJava and Java versions (just for maxent.jar option)
*Wallace* uses the `rJava` package only 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 <a href="https://java.com/en/download/manual.jsp" target="_blank">here</a>, 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 <a href="https://stackoverflow.com/questions/30738974/rjava-load-error-in-rstudio-r-after-upgrading-to-osx-yosemite" target="_blank">this StackOverflow post</a> 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 <a href="https://www.java.com/en/download/help/mac_install.html" target="_blank">Mac</a> and <a href="https://www.java.com/en/download/help/windows_offline_download.html" target="_blank">Windows</a>.

Expand Down
2 changes: 1 addition & 1 deletion inst/shiny/Rmd/text_intro_tab.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ output: html_document

#### WORKFLOW

*Wallace* (v2024.09.18) currently includes ten components, or steps of a possible workflow. Each component includes two or more modules, which are possible analyses for that step.
*Wallace* (v2024.11.18) currently includes ten components, or steps of a possible workflow. Each component includes two or more modules, which are possible analyses for that step.

**Components:**

Expand Down
2 changes: 1 addition & 1 deletion inst/shiny/Rmd/userReport_intro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ knit_engines$set(asis = function(options) {
knitr::opts_chunk$set(message = FALSE, warning = FALSE, eval = FALSE)
```

Please find below the R code history from your *Wallace* v2024.09.18 session.
Please find below the R code history from your *Wallace* v2024.11.18 session.

You can reproduce your session results by running this R Markdown file in RStudio.

Expand Down
3 changes: 3 additions & 0 deletions inst/shiny/modules/mask_userSDM.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ mask_userSDM_module_server <- function(input, output, session, common) {
spp[[sppName]]$mask$userSDM <- userSDMs$sdm * 1
spp[[sppName]]$mask$userPolyExt <- userSDMs$extSdm
logger %>% writeLog(hlSpp(sppName), "User SDM prediction loaded")
# For biomodelos
spp[[sppName]]$biomodelos$mask$userSDM <- userSDMs$sdm * 1
spp[[sppName]]$biomodelos$mask$userPolyExt <- userSDMs$extSdm

# REFERENCES ####
knitcitations::citep(citation("raster"))
Expand Down
Loading