This:
FALSY <- FALSE
TRUTHY <- TRUE
is_falsy <- function(object) {
is.null(object) ||
identical(object, FALSE) ||
identical(object, 0L) ||
identical(object, 0.0) ||
identical(object, 0+0i) ||
identical(object, "") ||
identical(object, as.raw(0)) ||
identical(object, logical()) ||
identical(object, integer()) ||
identical(object, double()) ||
identical(object, complex()) ||
identical(object, character()) ||
identical(object, raw()) ||
identical(object, list()) ||
inherits(object, "try-error")
}
is_truthy <- function(object) {
! is_falsy(object)
}
`%&&%` <- function(lhs, rhs) {
lres <- withVisible(eval(lhs, envir = parent.frame()))
if (is_truthy(lres$value)) {
eval(rhs, envir = parent.frame())
} else {
if (lres$visible) { lres$value } else { invisible(lres$value) }
}
}
nay <- function(rhs) {
if (is_falsy(rhs)) { TRUTHY } else { FALSY }
}
try_quietly <- function(expr) {
try(expr, silent = TRUE)
}
is the entire extent (minus roxygen comments) of the package. Why not just include it in your package?
Failing that, possibly ask Gabor if he's planning re-releasing it to CRAN or if you could take over maintenance?