From 3cca66332a3644297cbd927a06c8c578b25eedaf Mon Sep 17 00:00:00 2001 From: Philipp Kuntschik Date: Tue, 2 Apr 2019 17:29:28 +0200 Subject: [PATCH] fix: a bug when a pattern is in the middle of a annotation unit --- R/autoCoding.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/autoCoding.R b/R/autoCoding.R index cc7087e..91e8651 100644 --- a/R/autoCoding.R +++ b/R/autoCoding.R @@ -72,7 +72,7 @@ codingBySearchOneFile <- function(pattern, fid, cid, seperator, concatenate, ... ## get the matching analysis units unit_start_reference <- findInterval(pattern_matches, unit_start_indexes) - unit_end_reference <- findInterval(pattern_matches + attr(pattern_matches, "match.length"), unit_end_indexes) + unit_end_reference <- findInterval(pattern_matches + attr(pattern_matches, "match.length"), unit_start_indexes, left.open = TRUE) if(concatenate){ ## get a logical array with true values for start references that we need to skip