Skip to content

Commit

Permalink
Fixes #106
Browse files Browse the repository at this point in the history
Allows case insensitive matching of user input keywords to the LTER Controlled Vocabullary.
  • Loading branch information
clnsmth committed Mar 14, 2022
1 parent cc5da88 commit 83a44a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,11 @@ vocab_lter_term <- function(x, messages = FALSE, interactive = FALSE){

# Construct the query and search --------------------------------------------

# Assume case insensitivity and convert to lower case, which is used by the
# LTER CV

x <- tolower(x)

term <- stringr::str_replace_all(
string = x,
pattern = ' ',
Expand All @@ -822,7 +827,7 @@ vocab_lter_term <- function(x, messages = FALSE, interactive = FALSE){
term
)
)

# Parse the responses and combine -------------------------------------------


Expand Down

0 comments on commit 83a44a3

Please sign in to comment.