Usage
observe(x, env = parent.frame(), quoted = FALSE, label = NULL, suspended = FALSE, priority = 0, domain = getDefaultReactiveDomain(), autoDestroy = TRUE, ..stacktraceon = TRUE)
Arguments
x
An expression (quoted or unquoted). Any return value will be
ignored.
env
The parent environment for the reactive expression. By default,
this is the calling environment, the same as when defining an ordinary
non-reactive expression.
quoted
Is the expression quoted? By default, this is FALSE
.
This is useful when you want to use an expression that is stored in a
variable; to do so, it must be quoted with quote()
.
label
A label for the observer, useful for debugging.
suspended
If TRUE
, start the observer in a suspended state. If
FALSE
(the default), start in a non-suspended state.
priority
An integer or numeric that controls the priority with which
this observer should be executed. A higher value means higher priority: an
observer with a higher priority value will execute before all observers
with lower priority values. Positive, negative, and zero values are
allowed.
autoDestroy
If TRUE
(the default), the observer will be
automatically destroyed when its domain (if any) ends.
..stacktraceon
Advanced use only. For stack manipulation purposes; see
stacktrace
.