checkReactivityPrerequisites-ReactiveObject.S3-method: Check Prerequisits for Setting Reactive Objects...

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

Description

See generic: checkReactivityPrerequisites

Usage

1
2
3
## S4 method for signature 'ReactiveObject.S3'
checkReactivityPrerequisites(input = NULL,
  strict = 0, ...)

Arguments

input

ReactiveObject.S3.

strict

numeric. Relevant when initially setting a reactive object

  • 0: no checks are performed

  • 1: warning if object is already a non-reactive or reactive object or if any references does not exist yet

  • 2: error if object is already a non-reactive or reactive object or if any references do not exist yet

...

Further arguments to be passed to subsequent functions/methods.

Value

logical. TRUE: check passed; FALSE: check not passed.

Author(s)

Janko Thyson janko.thyson@rappster.de

References

http://github.com/Rappster/reactr

See Also

checkReactivityPrerequisites, setReactive

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

## NOTE
## This function has a strong internal character as it is mainly designed to 
## be used inside of 'setReactive()'.
## Thus not all aspects can be properly illustrated if the function is not 
## used in its default context

## Start with a fresh registry state //
resetRegistry()

suppressWarnings(rm(x_1))
input <- reactr::ReactiveObject.S3(
  id = "x_1",
  value = 10
)

## Error reason: object does not exist yet //
try(checkReactivityPrerequisites(input = input, strict = 2))

## Error reason: object exists but is non-reactive //
x_1 <- 10
try(checkReactivityPrerequisites(input = input, strict = 2))

## Error reason: reactive object already exists //
## This cannot be illustrated outside the context of 'setReactive()'

## All prerequisites met //
checkReactivityPrerequisites(input = input)


## End(Not run)

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