Skip to content

Commit

Permalink
v4.2-5-2
Browse files Browse the repository at this point in the history
Fix order for variable names for new.env in BIOMOD_Projection and BIOMOD_EnsembleForecasting
  • Loading branch information
MayaGueguen committed May 31, 2024
1 parent 2ae4463 commit 3709ae9
Show file tree
Hide file tree
Showing 93 changed files with 104 additions and 96 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: biomod2
Type: Package
Title: Ensemble Platform for Species Distribution Modeling
Version: 4.2-5-1
Date: 2024-05-30
Version: 4.2-5-2
Date: 2024-05-31
Authors@R: c(person("Wilfried", "Thuiller", role = c("aut")
, email = "[email protected]"),
person("Damien", "Georges", role = c("aut")),
Expand Down
2 changes: 2 additions & 0 deletions R/BIOMOD_EnsembleForecasting.R
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,12 @@ BIOMOD_EnsembleForecasting <- function(bm.em,

if (inherits(new.env, 'SpatRaster')) {
.fun_testIfIn(TRUE, "names(new.env)", names(new.env), bm.em@expl.var.names, exact = TRUE)
new.env <- new.env[[bm.em@expl.var.names]]
new.env.mask <- .get_data_mask(new.env, value.out = 1)
new.env <- mask(new.env, new.env.mask)
} else {
.fun_testIfIn(TRUE, "colnames(new.env)", colnames(new.env), bm.em@expl.var.names, exact = TRUE)
new.env <- new.env[ , bm.em@expl.var.names, drop = FALSE]
}

which.factor <- which(sapply(new.env, is.factor))
Expand Down
1 change: 1 addition & 0 deletions R/BIOMOD_Projection.R
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ BIOMOD_Projection <- function(bm.mod,

if (inherits(new.env, 'SpatRaster')) {
.fun_testIfIn(TRUE, "names(new.env)", names(new.env), bm.mod@expl.var.names, exact = TRUE)
new.env <- new.env[[bm.mod@expl.var.names]]
new.env.mask <- .get_data_mask(new.env, value.out = 1)
new.env <- mask(new.env, new.env.mask)
} else {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Cran Version](https://www.r-pkg.org/badges/version/biomod2?color=yellow)](https://cran.r-project.org/package=biomod2)
[![Github Version](https://img.shields.io/badge/devel%20version-4.2--5--1-blue.svg)](https://github.com/biomodhub/biomod2)
[![Github Version](https://img.shields.io/badge/devel%20version-4.2--5--2-blue.svg)](https://github.com/biomodhub/biomod2)
[![Last Commit](https://img.shields.io/github/last-commit/biomodhub/biomod2.svg)](https://github.com/biomodhub/biomod2/commits/master)
[![R-CMD-check](https://github.com/biomodhub/biomod2/actions/workflows/R-CMD-check.yml/badge.svg)](https://github.com/biomodhub/biomod2/actions/workflows/R-CMD-check.yml)

Expand Down Expand Up @@ -49,7 +49,7 @@ install.packages("biomod2", dependencies = TRUE)

<br/>

- **Development version** [![v](https://img.shields.io/badge/devel%20version-4.2--5--1-blue.svg)](https://github.com/biomodhub/biomod2) from [biomodhub](https://github.com/biomodhub/biomod2) :
- **Development version** [![v](https://img.shields.io/badge/devel%20version-4.2--5--2-blue.svg)](https://github.com/biomodhub/biomod2) from [biomodhub](https://github.com/biomodhub/biomod2) :

```R
library(devtools)
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

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

2 changes: 1 addition & 1 deletion docs/articles/examples_1_mainFunctions.html

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

2 changes: 1 addition & 1 deletion docs/articles/examples_2_secundaryFunctions.html

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

2 changes: 1 addition & 1 deletion docs/articles/index.html

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

6 changes: 5 additions & 1 deletion docs/articles/news.html

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

2 changes: 1 addition & 1 deletion docs/articles/vignette_crossValidation.html

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

2 changes: 1 addition & 1 deletion docs/articles/vignette_dataPreparation.html

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

2 changes: 1 addition & 1 deletion docs/articles/vignette_modelingOptions.html

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

2 changes: 1 addition & 1 deletion docs/articles/vignette_presentation.html

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

2 changes: 1 addition & 1 deletion docs/articles/vignette_pseudoAbsences.html

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

2 changes: 1 addition & 1 deletion docs/articles/vignette_variability.html

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

2 changes: 1 addition & 1 deletion docs/articles/vignette_videos.html

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

6 changes: 3 additions & 3 deletions docs/authors.html

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

6 changes: 3 additions & 3 deletions docs/index.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD.ensemble.models.out.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD.formated.data.PA.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD.formated.data.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD.models.options.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD.models.out.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD.options.dataset.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD.options.default.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD.projection.out.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD.stored.data.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD_CrossValidation-deprecated.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD_EnsembleForecasting.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD_EnsembleModeling.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD_FormatingData.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD_LoadModels.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD_Modeling.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD_PresenceOnly-deprecated.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD_Projection.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD_RangeSize.html

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

2 changes: 1 addition & 1 deletion docs/reference/BIOMOD_tuning-deprecated.html

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

2 changes: 1 addition & 1 deletion docs/reference/BinaryTransformation-deprecated.html

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

Loading

0 comments on commit 3709ae9

Please sign in to comment.