Fix bool vector length and R 4.3 compatibility of collocation analysis

Resolves #12

Change-Id: Ifc551e63f77cf9b024e7fd06976d5c5dd9bfac8c
diff --git a/R/collocationAnalysis.R b/R/collocationAnalysis.R
index fcc80c1..fc9d814 100644
--- a/R/collocationAnalysis.R
+++ b/R/collocationAnalysis.R
@@ -280,7 +280,7 @@
         ""
 #    cat(paste("right:", right, "\n", collapse=" "))
 
-    if(is.na(left) || is.na(right) || length(left) + length(right) == 0) {
+    if(is.na(left[1]) || is.na(right[1]) || length(left) + length(right) == 0) {
       oldTable
     } else {
       table(c(left, right)) %>%