Closed kbenoit closed 3 years ago
It's sneaky: it comes from utils.R
where:
friendly_class_undefined_message <- quanteda:::friendly_class_undefined_message
and in the quanteda package, that function uses a stringi call:
> quanteda:::friendly_class_undefined_message
function(object_class, function_name) {
valid_object_types <-
utils::methods(function_name) %>%
as.character() %>%
stringi::stri_replace_first_fixed(paste0(function_name, "."), "")
valid_object_types <- valid_object_types[valid_object_types != "default"]
paste0(function_name, "() only works on ",
paste(valid_object_types, collapse = ", "),
" objects.")
}
<bytecode: 0x7f7f7386df50>
<environment: namespace:quanteda>
Since it's a second-order dependency anyway, I've just added it to Imports.
From CHECK:
But I cannot find anywhere that we are using stringi for this package.
???