Skip to content

Commit

Permalink
bump biomod2 version requirement due to their renamed options function
Browse files Browse the repository at this point in the history
biomod2 v4.2-5 [2024] renamed `BIOMOD_ModelingOptions()` to `bm_ModelingOptions()`

<https://github.com/biomodhub/biomod2/releases/tag/v4.2-5>

FYI @CeresBarros
  • Loading branch information
achubaty committed May 9, 2024
1 parent 732fe55 commit 9d4aeb9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ URL:
https://landr.predictiveecology.org,
https://github.com/PredictiveEcology/LandR
Date: 2024-05-08
Version: 1.1.0.9084
Version: 1.1.0.9085
Authors@R: c(
person("Eliot J B", "McIntire", email = "eliot.mcintire@nrcan-rncan.gc.ca",
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6914-8316")),
Expand Down Expand Up @@ -53,7 +53,7 @@ Imports:
viridis
Suggests:
bbmle,
biomod2 (>= 4.2-2),
biomod2 (>= 4.2-5),

This comment has been minimized.

Copy link
@CeresBarros

CeresBarros May 9, 2024

Member

I don't think this is a good idea for now as i don't have time to update my fork

BioSIM,
covr,
curl,
Expand Down
7 changes: 3 additions & 4 deletions R/biomodWrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ utils::globalVariables(c(
## BIOMOD FUNCTION WRAPPERS USED TO ESTIMATE SEP
## for caching, looping and parallelizing

#' BIOMOD_Modeling wrapper
#' `BIOMOD_Modeling` wrapper
#'
#' @param sp character of species name to subset `responseVarData` table
#'
Expand All @@ -25,7 +25,7 @@ utils::globalVariables(c(
#' @param predictorVarsData environmental data.
#'
#' @param responseVarData a data.table or list of data.tables with environmental data.
#' If a list, it should be named according to `sp`, for subsetting.#'
#' If a list, it should be named according to `sp`, for subsetting.
#'
#' @param dir.name passed to [biomod2::BIOMOD_FormatingData]
#'
Expand All @@ -44,8 +44,7 @@ biomodModelingWrapper <- function(sp, responseVar, responseVarData, predictorVar
...) {
if (requireNamespace("biomod2", quietly = TRUE)) {
if (is.null(bm.options)) {
bm.options <- biomod2::BIOMOD_ModelingOptions(GLM = list(type = "simple"),
GAM = list(k = 2))
bm.options <- biomod2::bm_ModelingOptions(GLM = list(type = "simple"), GAM = list(k = 2))

This comment has been minimized.

Copy link
@CeresBarros

CeresBarros May 9, 2024

Member

I don't think this is a good idea for now as i don't have time to update my fork

}
## Checks ------------------
if (is(responseVar, "list") & is.null(names(responseVar))) {
Expand Down
6 changes: 3 additions & 3 deletions man/biomodModelingWrapper.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 comments on commit 9d4aeb9

@achubaty
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these changes are on a separate branch, so we can update after you have a chance to revisit the changes you made in your fork

@CeresBarros
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, just notice that this branch is currently broken then

Please sign in to comment.