1
0
mirror of https://github.com/msberends/AMR.git synced 2026-06-29 16:56:21 +02:00

(v3.0.1.9062) Fix older R versions

This commit is contained in:
2026-06-24 10:19:15 +02:00
parent 0c1709c999
commit ab38fb911d
6 changed files with 26 additions and 20 deletions

View File

@@ -708,7 +708,7 @@ stop_ifnot <- function(expr, ..., call = TRUE) {
}
}
"%or%" <- function(x, y) {
"%or_if_na%" <- function(x, y) {
if (is.null(x) || is.null(y)) {
if (is.null(x)) {
return(y)
@@ -1846,4 +1846,10 @@ if (getRversion() < "4.0.0") {
}
}
if (getRversion() < "4.4.0") {
`%||%` <- function(x, y) {
if (is.null(x)) y else x
}
}
# nolint end