Tutorial by Examples

A reactive can be used to make output depend on another expression. In the example below, the output$text element is dependent on text_reactive, which in turn is dependent on input$user_text. Whenever input$user_text changes, output$text element and text_reactive become invalidated. They are recalcu...
eventReactives are similar to reactives, they are constructed as follows: eventReactive( event { code to run }) eventReactives are not dependent on all reactive expressions in their body ('code to run' in the snippet above). Instead, they are only dependent on the expressions specified in the ...
reactiveValues can be used to store objects, to which other expressions can take a dependency. In the example below, a reactiveValues object is initialized with value "No text has been submitted yet.". A separate observer is created to update the reactiveValues object whenever the submit ...
An observeEvent object can be used to trigger a piece of code when a certain event occurs. It is constructed as: observeEvent( event { code to run }) The observeEvent will only be dependent on the 'event' section in the small piece of code above. It will not be dependent on anything in the 'co...
An observe expression is triggered every time one of its inputs changes. The major difference with regards to a reactive expression is that it yields no output, and it should only be used for its side effects (such as modifying a reactiveValues object, or triggering a pop-up). Also, note that obser...

Page 1 of 1