Skip to content

Commit 041ae73

Browse files
author
Rémi Patin
committed
added check to have at least one ensemble model asked for
1 parent 3635eeb commit 041ae73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

R/BIOMOD_EnsembleModeling.R

+3
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,9 @@ BIOMOD_EnsembleModeling <- function(bm.mod,
820820
stop("You must choose metric.select if you want to compute Committee Averaging or Probability Weighted Mean algorithms")
821821
}
822822

823+
if(all(! c(prob.mean, prob.median, prob.cv, prob.ci, committee.averaging, prob.mean.weight))){
824+
stop("at least one of prob.mean, prob.cv, prob.ci, prob.median, committee.averaging and prob.mean.weight must be set to TRUE")
825+
}
823826
## 6.1 Check alpha for Confident interval
824827
if (prob.ci) {
825828
.fun_testIfPosNum(TRUE, "prob.ci.alpha", prob.ci.alpha)

0 commit comments

Comments
 (0)