1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 08:32:04 +02:00
This commit is contained in:
2022-10-02 15:48:07 +02:00
parent c2b89d541e
commit 75e05a201a
6 changed files with 13 additions and 15 deletions

View File

@ -1459,6 +1459,13 @@ if (getRversion() < "3.3.0") {
paste0(replicate(times, x), collapse = "")
}, list(x = x, times = times), MoreArgs = list()), use.names = FALSE)
}
}
if (getRversion() < "3.5.0") {
isFALSE <- function(x) {
is.logical(x) && length(x) == 1L && !is.na(x) && !x
}
# trims() was introduced in 3.3.0, but its argument `whitespace` only in 3.5.0
trimws <- function(x, which = c("both", "left", "right"), whitespace = "[ \t\r\n]") {
which <- match.arg(which)
mysub <- function(re, x) sub(re, "", x, perl = TRUE)
@ -1470,12 +1477,6 @@ if (getRversion() < "3.3.0") {
}
}
if (getRversion() < "3.5.0") {
isFALSE <- function(x) {
is.logical(x) && length(x) == 1L && !is.na(x) && !x
}
}
if (getRversion() < "3.6.0") {
str2lang <- function(s) {
stopifnot(length(s) == 1L)