Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

assign-active

Create an active binding.


Description

Infix form of makeActiveBinding which creates an active binding between a name and an expression: every time the name is accessed the expression is recomputed.

Usage

x %<a-% value

Arguments

x

unquoted expression naming variable to create

value

unquoted expression to evaluate every time name is accessed

Examples

x %<a-% runif(1)
x
x
x %<a-% runif(10)
x
x
rm(x)

pryr

Tools for Computing on the Language

v0.1.4
GPL-2
Authors
Hadley Wickham [aut, cre], R Core team [ctb] (Some code extracted from base R)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.