rmFromRegistry-character-environment-method: Remove From Registry (character-environment)

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

Description

See generic: rmFromRegistry

Usage

1
2
3
## S4 method for signature 'character,environment'
rmFromRegistry(id, where = parent.frame(),
  ...)

Arguments

id

character.

where

environment.

...

Further arguments to be passed to subsequent functions/methods.

Value

logical. TRUE: successfully removed; FALSE: not removed because there was nothing to remove.

Author(s)

Janko Thyson janko.thyson@rappster.de

References

http://github.com/Rappster/reactr

See Also

rmFromRegistry

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
## Not run: 

## NOTE //
## This function should typically only be called inside 'unsetReactive()'
## as it manages the internal registry!

## Start with a clean registry //
resetRegistry()

where <- new.env()
setReactive(id = "x_1", value = 10, where = where)
setReactive(id = "x_2", 
  value = function() .ref_1 <- get("x_1"),
  where = where
)

## Insepct registry before removal //
showRegistry()

rmFromRegistry(id = "x_1", where = where)
showRegistry()
rmFromRegistry(id = "x_2", where = where)
showRegistry()

## Sanity of actual cached values is not affected by this unless other values
## for `strict_get` are chosen
where$x_1
where$x_2


## End(Not run)

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