From 691e602d0432bb512422e2fcff9d72ffa6daaa57 Mon Sep 17 00:00:00 2001 From: Till Krenz Date: Wed, 7 Nov 2018 18:00:17 -0500 Subject: [PATCH] loop for middle initial now uses length(newmi) changed loop for middle initial using newmi instead of newfi --- R/authors_match.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/authors_match.R b/R/authors_match.R index 70d2dca..50b0852 100644 --- a/R/authors_match.R +++ b/R/authors_match.R @@ -242,7 +242,7 @@ for (n in unique.names.over1) { if (length(mi.check) > 1) { newmi <- mi.check[2:length(mi.check)] newGroupID1 <- vapply(newmi, function(x) sub$ID[sub$f.i == substr(x, 1, 1) & sub$m.i == substr(x, 3, 3)][1],numeric(1)) - for (q in seq_len(length(newfi))) { + for (q in seq_len(length(newmi))) { novel.names$groupID[novel.names$ID %in% sub$ID & novel.names$f.i == substr(newmi[q], 1, 1) & novel.names$m.i == substr(newmi[q], 3, 3)] <- newGroupID[q] } }