From 89a4087de6e211dab833c7979a7b40a0ca1726fb Mon Sep 17 00:00:00 2001
From: Maria Voigt <maria.voigt@idiv.de>
Date: Wed, 19 Apr 2017 14:44:21 +0200
Subject: [PATCH] fixing bug in either/or statement for making results
 dataframe

---
 src/model_fitting/abundance_model.R | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/model_fitting/abundance_model.R b/src/model_fitting/abundance_model.R
index 6b51688..53788c9 100644
--- a/src/model_fitting/abundance_model.R
+++ b/src/model_fitting/abundance_model.R
@@ -384,7 +384,7 @@ if(is_verbose){print(paste("8. Start running models", Sys.time()))}
 results_res <- foreach(i = 1:nrow(all_model_terms),
                        .combine = rbind) %dopar%{
     # make results dataframe
-    if (is.na(exclude_year) | is.na(exclude_grid)){
+    if (is.na(exclude_year) & is.na(exclude_grid)){
       result <- as.data.frame(matrix(NA, ncol = 3 *
                                        length(model_terms) + 5,
                                      nrow = 1))
-- 
GitLab