From 647ab77a212ac60c146f53c58a99709dfbfa7332 Mon Sep 17 00:00:00 2001 From: Bethany Johnson Date: Tue, 19 Nov 2024 15:31:55 -0500 Subject: [PATCH 1/4] load user sdm --- inst/shiny/modules/mask_userSDM.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inst/shiny/modules/mask_userSDM.R b/inst/shiny/modules/mask_userSDM.R index 2725ffa8..3388fd26 100644 --- a/inst/shiny/modules/mask_userSDM.R +++ b/inst/shiny/modules/mask_userSDM.R @@ -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")) From e7e7bc2bcc30327ee6edfd8ae6a57a10a0f44bce Mon Sep 17 00:00:00 2001 From: Bethany Johnson Date: Tue, 19 Nov 2024 16:36:56 -0500 Subject: [PATCH 2/4] added stars & lwgeom to imports --- DESCRIPTION | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 36ed0d3c..4ca1f159 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 @@ -44,6 +44,7 @@ Imports: knitcitations, leafem, leaflet.extras (>= 1.0.0), + lwgeom, magrittr, maskRangeR, markdown, @@ -58,6 +59,7 @@ Imports: shinyWidgets (>= 0.6.0), spocc (>= 1.2.0), spThin, + stars, terra (>= 1.6-7), zip Suggests: @@ -80,7 +82,6 @@ Suggests: rgbif (>= 3.3.0), sf, sp, - stars, testthat, tidyselect, tools From f78baa8b97480dc892fc9ab4edc3e83a868c8a7b Mon Sep 17 00:00:00 2001 From: Bethany Johnson Date: Tue, 19 Nov 2024 16:37:21 -0500 Subject: [PATCH 3/4] updated install instructions and cRR warning --- README.md | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5a3565f7..053ac334 100644 --- a/README.md +++ b/README.md @@ -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 (Mac OS, Windows) and RStudio (Mac OS / Windows: 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 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* 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 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 +#### 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 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. From 4cd1ca66200d4ca3c78f05f3d65785b1e9665933 Mon Sep 17 00:00:00 2001 From: Bethany Johnson Date: Tue, 19 Nov 2024 16:37:40 -0500 Subject: [PATCH 4/4] v2024.11.18 --- inst/shiny/Rmd/text_intro_tab.Rmd | 2 +- inst/shiny/Rmd/userReport_intro.Rmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/shiny/Rmd/text_intro_tab.Rmd b/inst/shiny/Rmd/text_intro_tab.Rmd index 591536c2..b00cb7e5 100644 --- a/inst/shiny/Rmd/text_intro_tab.Rmd +++ b/inst/shiny/Rmd/text_intro_tab.Rmd @@ -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:** diff --git a/inst/shiny/Rmd/userReport_intro.Rmd b/inst/shiny/Rmd/userReport_intro.Rmd index 36608db7..8beb9ff4 100644 --- a/inst/shiny/Rmd/userReport_intro.Rmd +++ b/inst/shiny/Rmd/userReport_intro.Rmd @@ -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.