check-vector-isExisting | R Documentation |
Does the requested input exist in the environment?
isExisting(x, envir = parent.frame(), inherits = FALSE)
isNonExisting(x, envir = parent.frame(), inherits = FALSE)
allAreExisting(x, envir = parent.frame(), inherits = FALSE)
allAreNonExisting(x, envir = parent.frame(), inherits = FALSE)
x |
|
envir |
|
inherits |
|
TRUE
on success;
FALSE
on failure, with cause set.
isExisting()
: Vectorized.
isNonExisting()
: Vectorized.
allAreExisting()
: Scalar.
allAreNonExisting()
: Scalar.
exists()
only supports character(1)
, so we are
exporting isExisting()
as a convenience function to check multiple
variables in a single call.
Updated 2023-10-02.
assertive.code::is_existing()
.
a <- 1L
b <- 2L
## TRUE ====
isExisting(c("a", "b"))
allAreNonExisting(c("x", "y"))
## FALSE ====
isExisting(c("x", "y"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.