copyReactive-character-environment-character-environment-method: Copy Reactive Object...

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

Description

See generic: copyReactive

Usage

1
2
3
## S4 method for signature 'character,environment,character,environment'
copyReactive(id_from,
  where_from = parent.frame(), id_to, where_to = parent.frame(), ...)

Arguments

id_from

character.

where_from

environment.

id_to

character.

where_to

Signature argument. Object containing location information of object that the copy is assigned to.

...

Further arguments to be passed to subsequent functions/methods.

where_from

environment.

Value

ANY. Object/object value.

Author(s)

Janko Thyson janko.thyson@rappster.de

References

http://github.com/Rappster/reactr

See Also

copyReactive

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

##------------------------------------------------------------------------------
## setReactive --> ReactiveObject.S3 //
##------------------------------------------------------------------------------

setReactive(id = "x_1", value = 10)
copyReactive(id_from = "x_1", id_to = "x_1_c")
x_1_c == x_1

x_1 <- 20
x_1_c
## --> x_1_c is not affected by the change in `x_1` as the two underlying 
## invisible objects are independent from each other:
identical(getFromRegistry("x_1"), getFromRegistry("x_1_c"))

## Classes //
class(getFromRegistry("x_1"))
class(getFromRegistry("x_1_c"))


##------------------------------------------------------------------------------
## setShinyReactive --> ReactiveShinyObject //
##------------------------------------------------------------------------------

setShinyReactive(id = "x_1", value = 10)
copyReactive(id_from = "x_1", id_to = "x_1_c")
x_1_c == x_1

x_1 <- 20
x_1_c
## --> x_1_c is not affected by the change in `x_1` as the two underlying 
## invisible objects are independent from each other:
identical(getFromRegistry("x_1"), getFromRegistry("x_1_c"))

## Classes //
class(getFromRegistry("x_1"))
class(getFromRegistry("x_1_c"))


## End(Not run)

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