Description Usage Arguments Value Author(s) References See Also Examples
See generic: rmReactive
1 2 | ## S4 method for signature 'character,environment'
rmReactive(id, where = parent.frame(), ...)
|
id |
|
where |
|
... |
Further arguments to be passed to subsequent functions/methods. |
logical
. TRUE
: success; FALSE
: object
was not a reactive one or failure to remove.
Janko Thyson janko.thyson@rappster.de
http://github.com/Rappster/reactr
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ## Not run:
## Start with fresh registry //
resetRegistry()
## Non-strict //
setReactive(id = "x_1", value = 10)
setReactive(id = "x_2",
value = function() {
"object-ref: {id: x_1}"
x_1 * 2
}
)
rmReactive(id = "x_1")
exists("x_1", envir = environment(), inherits = FALSE)
x_2
## --> `x_2` not affected but only because `strict_get = 0`
## Strict: level 1 //
setReactive(id = "x_1", value = 10)
setReactive(id = "x_2",
value = function() {
"object-ref: {id: x_1}"
x_1 * 2
},
strict_get = 1
)
rmReactive(id = "x_1")
try(x_2)
## --> warning as referenced object `x_1` does not exist anymore
## Strict: level 2 //
setReactive(id = "x_1", value = 10)
setReactive(id = "x_2",
value = function() {
"object-ref: {id: x_1}"
x_1 * 2
},
strict_get = 2
)
rmReactive(id = "x_1")
try(x_2)
## --> error as referenced object `x_1` does not exist anymore
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.