diff --git a/R/operators.R b/R/operators.R index dfacbf60a..3210b6347 100644 --- a/R/operators.R +++ b/R/operators.R @@ -13,6 +13,12 @@ `%||%` <- function(x, y) { if (is_null(x)) y else x } + +# Reexport from base on newer versions of R to avoid conflict messages +if (exists("%||%", envir = baseenv())) { + `%||%` <- get("%||%", envir = baseenv()) +} + `%|0|%` <- function(x, y) { if (!length(x)) y else x }