Skip to content

Commit 8258e59

Browse files
authored
Fix common_to_sci() ignoring Language argument (#321)
The Language parameter was accepted but not forwarded to get_comnames(), so all lookups silently used English regardless of what was specified. Also removes unnecessary enquo() wrapping of an already-evaluated string. Fixes #275
1 parent 0e093e4 commit 8258e59

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

R/common_names.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ common_to_sci <- function(x,
2626
version = "latest",
2727
db = NULL){
2828

29-
comnames <- get_comnames(server, version)
30-
subset <-
29+
comnames <- get_comnames(server, version, db = db, lang = Language)
30+
subset <-
3131
purrr::map_dfr(x, function(y){
3232
y <- stringr::str_to_lower(y)
33-
y <- rlang::enquo(y)
34-
dplyr::filter(comnames, grepl(!!y, stringr::str_to_lower(ComName)))
33+
dplyr::filter(comnames, grepl(y, stringr::str_to_lower(ComName)))
3534
})
3635

3736
subset

0 commit comments

Comments
 (0)