widgetInvalidate: Invalidate the current reactive context

Description Usage Arguments Details See Also Examples

View source: R/widgetHelper.R

Description

Schedules the current reactive context to be invalidated in the given number of milliseconds. If millis=NULL then the waiting time is set to 500/value.

Usage

1
widgetInvalidate(value, millis = NULL, session = getDefaultReactiveDomain())

Arguments

value

A parameter which determines how fast the current reactive context will be invalidated

millis

Approximate milliseconds to wait before invalidating the current reactive context.

session

A session object. This is needed to cancel any scheduled invalidations after a user has ended the session. If NULL, then this invalidation will not be tied to any session, and so it will still occur.

Details

If this is placed within an observer or reactive expression, that object will be invalidated (and re-execute) after the interval has passed. The re-execution will reset the invalidation flag, so in a typical use case, the object will keep re-executing and waiting for the specified interval. It's possible to stop this cycle by adding conditional logic that prevents the invalidateLater from being run.

See Also

invalidateLater, widgetDrawSample

Examples

1
2
3
4
5
6
## Not run: 
  # Press ESC after finishing the app
  shinyDemo('testDrawSample')
  shinyDemo('testDrawSampleLang')

## End(Not run)

sigbertklinke/mmstat documentation built on May 14, 2019, 8:36 a.m.