From b2f81cf3895a32ecc99208b0cc8a7686ac1c492f Mon Sep 17 00:00:00 2001 From: JetteReeg <47744741+JetteReeg@users.noreply.github.com> Date: Wed, 7 Feb 2024 11:00:55 +0100 Subject: [PATCH] Update class_DispersalParams.R corrected bug for having sex dependent settlement rules --- RangeShiftR/R/class_DispersalParams.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RangeShiftR/R/class_DispersalParams.R b/RangeShiftR/R/class_DispersalParams.R index 29e88a0..8ec6d9e 100644 --- a/RangeShiftR/R/class_DispersalParams.R +++ b/RangeShiftR/R/class_DispersalParams.R @@ -2098,7 +2098,7 @@ setValidity("DispersalParams", function(object) { msg <- c(msg, "Dispersal(): Settlement can only be density-dependent (DensDep = TRUE) if a movement process is used as transfer method!") } }else{ - if (object@Settlement@MaxSteps<=0 && all(object@Transfer@StepMort<=0) ) { + if (any(object@Settlement@MaxSteps<=0) && all(object@Transfer@StepMort<=0) ) { msg <- c(msg, "Dispersal(): At least one of the two options MaxSteps and StepMort must be set (>0) if a movement process is used as transfer method!") } }