More advanced topics in Shiny
The remainder of this chapter will be spent looking at some of the other functions that Shiny includes that can give your users a smoother and well-featured experience.
Finely controlling inputs and outputs
Shiny offers a variety of functions that allow you to directly control the user interface. You can program functions that take direct control over any of the input widgets, changing their labels, input range, or current selection, as well as switching the tabs on a tabsetPanel()
-based UI, all using built-in functions. The following example uses updateCheckboxGroupInput()
, which, as its name implies, is used to update the parameters of a checkboxGroupInput()
-based widget. We also need the observe()
function to make it work.
The observe()
function is for reactive functions that do not return objects but rather are run for their effect—controlling parts of the user interface, creating files, and so on. In this example, we are going to use it to control the UI,...