rmReactive-character-missing-method: Remove Reactive Object (character-missing)

Description Usage Arguments Value Author(s) References See Also Examples

Description

See generic: rmReactive

Usage

1
2
## S4 method for signature 'character,missing'
rmReactive(id, where = parent.frame(), ...)

Arguments

id

character.

where

missing. Internal argument that should not be set explicitly. The value at runtime will correspond to the function that has been provided via argument binding.

...

Further arguments to be passed to subsequent functions/methods.

Value

See method rmReactive-character-environment-method

Author(s)

Janko Thyson janko.thyson@rappster.de

References

http://github.com/Rappster/reactr

See Also

Generic: rmReactive

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
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)

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