fix for R < 3.4

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2022-12-30 12:57:27 +01:00
1 parent 1db74e86cd
commit e4ea96cbf9
8 files changed
+25 -24

No files matched your search

+2 -1
View File
@@ -380,7 +380,7 @@ import_fn <- function(name, pkg, error_on_fail = TRUE) {
error = function(e) {
if (isTRUE(error_on_fail)) {
stop_("function ", name, "() is not an exported object from package '", pkg,
"'. Please create an issue at https://github.com/msberends/AMR/issues. Many thanks!",
"'. Please create an issue at ", font_url("https://github.com/msberends/AMR/issues"), ". Many thanks!",
call = FALSE
)
} else {
@@ -476,6 +476,7 @@ word_wrap <- function(...,
# remove extra space that was introduced (e.g. "Smith et al., 2022")
msg <- gsub(". ,", ".,", msg, fixed = TRUE)
msg <- gsub("[ ,", "[,", msg, fixed = TRUE)
msg <- gsub("/ /", "//", msg, fixed = TRUE)
msg
}