%<a-% {pryr}R Documentation

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)

[Package pryr version 0.1.6 Index]