From 7514fba7aac4b88afc1b4c0e80e53b520b258ec8 Mon Sep 17 00:00:00 2001
From: Maria Voigt <maria.voigt@idiv.de>
Date: Fri, 12 May 2017 09:31:36 +0200
Subject: [PATCH] adding the suffix for exclude random

---
 src/model_fitting/abundance_model.R | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/model_fitting/abundance_model.R b/src/model_fitting/abundance_model.R
index 9127871..56c8778 100644
--- a/src/model_fitting/abundance_model.R
+++ b/src/model_fitting/abundance_model.R
@@ -128,12 +128,14 @@ PNB <- 0.88  #  proportion of nest builders from Spehar et al. 2010
 options("scipen" = 100, "digits" = 4)
 
 
-if (is.na(exclude_year) & is.na(exclude_grid)){
+if (is.na(exclude_year) & is.na(exclude_grid) & is.na(exclude_random)){
   name_suffix <- ""}
    if(!is.na(exclude_year)){
      name_suffix <- paste0("year_", exclude_year, "_")}
    if(!is.na(exclude_grid)){
      name_suffix <- paste0("gridcell_", exclude_grid, "_")}
+if(!is.na(exclude_random)){
+     name_suffix <- paste0("rand_", exclude_random, "_")}
 
 #---------------#
 #  Import data  #
-- 
GitLab