rmReactiveByUid: Remove Reactive Object (generic)

Description Usage Arguments Details Implications with respect to observing variables Note Author(s) References See Also Examples

Description

Removes a reactive object from its environment.

Usage

1

Arguments

uid

Signature argument. Object containing UID information.

...

Further arguments to be passed to subsequent functions/methods.

Details

Note that tis is different from unsetting a reactive object via rmReactiveByUid. It is equivalent to rm with a previous call to unsetReactiveByUid.

Implications with respect to observing variables

If other reactive variables have been observing the reactive variable that has been removed, from this point on they will simply return the last value that has been cached if strict = FALSE or NULL if strict = TRUE when the observing object was set via setReactive

Note

The main S4 method is rmReactiveByUid-character-method.

Author(s)

Janko Thyson janko.thyson@rappster.de

References

http://github.com/Rappster/reactr

See Also

rmReactiveByUid-character-method

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 

setReactive(id = "x_1", value = 10)
isReactive("x_1")
setReactive(id = "x_2", value = function() "object-ref: {id: x_1}")

unsetReactiveByUid(uid = computeObjectUid("x_1"))
isReactive("x_1")
## --> `x_1` is now a regular/non-reactive object again

## Actual values still identical //
x_1
identical(x_2, x_1)

## Implications for objects referencing `x_1` //
x_1 <- 20
x_1
x_2
## --> no reactive binding to `x_1` anymore

setReactive(id = "x_2", value = function() "object-ref: {id: x_1}",
              strict_get = 1)
x_1 <- 10
x_2


## End(Not run)

rappster/reactr documentation built on May 26, 2019, 11:56 p.m.