From 66b24baec8e309e71c7948bc70a8c12d910089d8 Mon Sep 17 00:00:00 2001
From: Francesco Sabatini <francesco.sabatini@idiv.de>
Date: Wed, 22 Apr 2020 19:09:02 +0200
Subject: [PATCH] Fixed bug in 99

---
 99_HIDDEN_functions.R | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/99_HIDDEN_functions.R b/99_HIDDEN_functions.R
index 0f7dfce..b76a9d0 100644
--- a/99_HIDDEN_functions.R
+++ b/99_HIDDEN_functions.R
@@ -53,7 +53,7 @@ get.corXY.bootstrap <- function(comm, traits, trait.sel="all", bootstrap=199){
   ## caution
   ## ALL columns with only 0-1 values are AUTOMATICALLY considered as asym.bin sensu FD:gowdis
   ##get all columns with binary variables
-  binary.traits <- which( (traits %>% summarize_all(is.bin)) ==T) 
+  binary.traits <- which( (traits %>% summarize_all( ~all(na.omit(.) %in% 0:1) )) ==T) 
   
   if(identical(trait.sel, "all")) {trait.sel <- 1:ncol(traits)}
   ii <- trait.sel
-- 
GitLab