is.nullref: Is Reference Null?

Description Usage Arguments Value Examples

View source: R/check.R

Description

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

Usage

1

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

1
2
3
4
5
6
7
8
# 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

refer documentation built on Nov. 8, 2021, 5:08 p.m.