Finally, we are going to add some interactivity to our graph by implementing another similar graph, which will exhibit a zoom-in effect on the one we created before. The idea is that we can select an area of the graph we just created and the one we will place below it will update to only show the specific area we have selected. Seems interesting, doesn't it?
To accomplish this, we need to modify the plotOutput() we inserted at the end of the previous section to include a brush parameter with a call to the brushOpts() function, which in turn receives the name of the unique identifier for the brush input we are creating. This parameter is used to create a special type of input, which retrieves a selected area from the graph shown in the web browser. We also add another fluidRow() with another plotOutput() just below it to...