We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7335d5 commit af48d46Copy full SHA for af48d46
1 file changed
R/im.R
@@ -20,9 +20,9 @@ member_regexp <- function(affiliations, im) {
20
}, regex)
21
22
matches <- lapply(matches, function(x, im) {
23
- match <- im$canonical[as.vector(!is.na(stri_extract_all_regex(im$regexp, x, case_insensitive=TRUE)))]
+ match <- im$canonical[as.vector(!is.na(stri_extract_first_regex(im$regexp, x, case_insensitive=TRUE)))]
24
if (length(match)==0) return(NA)
25
- match
+ match[1] # Only grabbing the first match to make sure the vector length stays the same
26
}, im)
27
28
factor(unlist(matches), levels=im$canonical, labels=im$canonical)
0 commit comments