We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be great if we could turn off the check by get_urban_data() when we call available().
get_urban_data()
available()
Something like :
get_urban_data <- function (name, warn_offensive = TRUE) { if (interactive() & warn_offensive) { cat("Urban Dictionary can contain potentially offensive results,\n should they be included? [Y]es / [N]o:\n") result <- tryCatch(scan("", what = "character", quiet = TRUE, nlines = 1), error = function(x) "N") if (!identical(toupper(result), "Y")) { return(NULL) } } term <- tryCatch(as.data.frame(udapi::get_term(name)), error = function(e) e) tags <- tryCatch(udapi::get_tags(name)$tags, error = function(e) e) structure(list(term, tags), class = "available_urban") }
And then
available <- function (name, browse = getOption("available.browse", TRUE), warn_offensive = TRUE, ...) { res <- list(valid_package_name(name), available_on_cran(name, ...), available_on_bioc(name, ...), available_on_github(name)) terms <- name_to_search_terms(name) res <- c(res, unlist(recursive = FALSE, lapply(terms, function(term) { compact(list(get_bad_words(term), get_abbreviation(term), get_wikipidia(term), get_wiktionary(term), get_urban_data(term, warn_offensive), get_sentiment(term))) }))) structure(res, class = "available_query", packagename = name, browse = browse) }
The text was updated successfully, but these errors were encountered:
Yeah, sounds good, want to do a PR?
Sorry, something went wrong.
Sure, I will do !
close issue r-lib#53
b2af095
No branches or pull requests
It would be great if we could turn off the check by
get_urban_data()
when we callavailable()
.Something like :
And then
The text was updated successfully, but these errors were encountered: