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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user