Learn R Programming

ref (version 0.95)

as.ref: coercing to reference

Description

This function RETURNs a reference to its argument.

Usage

as.ref(obj)

Arguments

obj
an object existing in the current environment/frame

Value

  • an object of class "ref"

See Also

ref, deref

Examples

Run this code
v <- 1
  r <- as.ref(v)
  r
  deref(r)

Run the code above in your browser using DataLab