is.ref {refer} | R Documentation |
Is Object a Reference?
Description
Check whether an R Object inherits a reference class.
Usage
is.ref(x)
is.sref(x)
is.rfexpr(x)
is.slice(x)
is.a.ref(x)
Arguments
x |
object of any class |
Value
TRUE
if x
is a reference object, otherwise FALSE
Functions
-
is.sref
: check whether object is an 'sref' object -
is.rfexpr
: check whether object is a reference expression -
is.slice
: check whether object references a slice of a vector -
is.a.ref
: check whether object is any type of reference class
Examples
# Create a vectors of random numbers
x <- rnorm(10)
# Create a reference to the random numbers
ref_to_x <- ref(x)
is.ref(ref_to_x) # TRUE
[Package refer version 0.1.0 Index]