is.nullref {refer} | R Documentation |
Check whether a ref
points to a NULL
object or an object
that no longer exists.
is.nullref(x)
x |
object of class |
TRUE
if x
is not a reference or points to an object that does not exist; otherwise FALSE
.
# Create a vectors of random numbers and a reference
x <- rnorm(10)
ref_to_x <- ref(x)
# Delete 'x' and check if NULL
is.nullref(ref_to_x) # FALSE
rm(x)
is.nullref(ref_to_x) # TRUE