is.nullref {refer}R Documentation

Is Reference Null?

Description

Check whether a ref points to a NULL object or an object that no longer exists.

Usage

is.nullref(x)

Arguments

x

object of class "ref"

Value

TRUE if x is not a reference or points to an object that does not exist; otherwise FALSE.

Examples

# 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


[Package refer version 0.1.0 Index]