Skip to Content
R Programming By Example
book

R Programming By Example

by Omar Trejo Navarro
December 2017
Beginner to intermediate
470 pages
12h 29m
English
Packt Publishing
Content preview from R Programming By Example

Adding interactivity with a secondary zoom-in graph

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Efficient R Programming

Efficient R Programming

Colin Gillespie, Robin Lovelace
R Programming

R Programming

Jared P. Lander

Publisher Resources

ISBN: 9781788292542Supplemental Content