#' Strictly ask RadLex v4
#' @importFrom readxl read_xls
#' @importFrom dplyr filter
#' @importFrom dplyr filter_all
#' @export
strictly_ask_radlex <-
function(phrase, path_to_radlex_xls) {
radlex <- readxl::read_xls(path_to_radlex_xls, col_types = "text")
updated_radlex <- radlex %>%
dplyr::filter(Obsolete == FALSE)
output <-
updated_radlex %>%
dplyr::filter_at(vars(`Preferred Label`), any_vars(grepl(paste0("^", phrase, "$"), ., ignore.case = TRUE)))
return(output)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.