From d2602457cb6e8e3e3043298479e1852fc7a35464 Mon Sep 17 00:00:00 2001
From: Francesco Sabatini <francesco.sabatini@idiv.de>
Date: Mon, 27 Apr 2020 12:27:16 +0200
Subject: [PATCH] Adjusted loop on combo selection at nround >1

---
 01b_MesobromionCluster.R | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/01b_MesobromionCluster.R b/01b_MesobromionCluster.R
index ba35464..77a6cf8 100644
--- a/01b_MesobromionCluster.R
+++ b/01b_MesobromionCluster.R
@@ -128,7 +128,7 @@ Mesobromion <- function(species.path, traits.path, output, myfunction="get.corXY
         nall <- length(allcomb.t)
         }  else {
           best.split <- as.numeric(unlist(strsplit(best, "_")))
-          max.inter.t <- nround-1
+          max.inter.t <- nround-length(best.split)
           #n.traits <- ncol(traits)
           list.traits <- as.numeric(traits.sign.alone)
           list.traits <- list.traits[-which(list.traits %in% best.split)] ## list of remaining traits without best
-- 
GitLab