Skip to content

Commit 7bf60f1

Browse files
committed
Fix IAS processing
1 parent 001dde3 commit 7bf60f1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

R/DWF_IAS_Distribution.R

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ IAS_Distribution <- function(
3636
stats::setNames(AllArgs)
3737
IASDT.R::CheckArgs(
3838
AllArgs = AllArgs, Type = "character", Args = c("Species", "EnvFile"))
39-
IASDT.R::CheckArgs(AllArgs = AllArgs, Type = "logical", Args = "Verbose")
39+
IASDT.R::CheckArgs(
40+
AllArgs = AllArgs, Type = "logical", Args = c("Verbose", "Overwrite"))
4041

4142
# # ..................................................................... ###
4243

@@ -241,13 +242,15 @@ IAS_Distribution <- function(
241242
IASDT.R::CatTime(
242243
paste0("There are ", length(Countries2Exclude), " countries to exclude:"),
243244
Level = 2)
244-
IASDT.R::CatTime(
245-
paste(sort(Countries2Exclude), collapse = " + "), Level = 3)
246-
245+
247246
# Mask grid to exclude countries - `TRUE` for grid cells to be considered as
248247
# presence if present in any of the data source; `FALSE` for grid cells need
249248
# to be masked as 0 in species distribution maps (1 becomes 0)
250249
if (length(Countries2Exclude) > 0) {
250+
251+
IASDT.R::CatTime(
252+
paste(sort(Countries2Exclude), collapse = " + "), Level = 3)
253+
251254
Mask_Keep <- Grid_10_CNT %>%
252255
dplyr::mutate(Keep = !(Country %in% Countries2Exclude)) %>%
253256
dplyr::select("Keep") %>%

0 commit comments

Comments
 (0)