diff --git a/NAMESPACE b/NAMESPACE index 619e23b..44e1f95 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -13,7 +13,6 @@ export("%names%") export("%out%") export("%wi%") export("%wo%") -export("%||%") export("%|||%") export(add) export(any_match) @@ -53,3 +52,4 @@ export(subset3) export(subtract) export(verbose) export(wuffle) +if (getRversion() < "4.4") export("%||%") diff --git a/man/if_null.Rd b/man/if_null.Rd index b098038..b3872c6 100644 --- a/man/if_null.Rd +++ b/man/if_null.Rd @@ -25,9 +25,11 @@ Replace if \code{NULL} or not length \details{ A mostly copy of \code{rlang}'s \verb{\%||\%} except does not use \code{rlang::is_null()}, which, currently, calls the same primitive \link[base:NULL]{base::is.null} function. + +Note: \verb{\%||\%} is not exported in versions of \strong{R} < 4.4. } \examples{ -# replace NULL +# replace NULL (for R < 4.4) NULL \%||\% 1L 2L \%||\% 1L @@ -39,4 +41,5 @@ NULL \%|||\% 1L # replace no length logical() \%len\% TRUE +FALSE \%len\% TRUE }