Book Image

Learning Shiny

By : Hernan Resnizky
Book Image

Learning Shiny

By: Hernan Resnizky

Overview of this book

Table of Contents (19 chapters)
Learning Shiny
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Introducing R, RStudio, and Shiny
Index

Interaction possibilities within R graphics


From Shiny 0.12, it has been possible to develop applications with graphics or images that are responsive to interactions. Its implementation is very simple, as the interaction events are tracked as any other input objects and behave in the exact same way. Until the 0.12 version, there have been four basic interaction events. In order to listen to them, the corresponding argument must be specified to the plotting function where the value of this argument is the corresponding listener. The following are the events:

  • Hover: This tracks the position of the mouse. The argument to be passed is hover and the function is hoverOpts().

  • Click: This tracks the position of the click. The argument is click and the function is clickOpts().

  • Double click: This tracks the position of the double-click. The argument is dblclick and the function is dblClickOpts().

  • Brush: This tracks the brushed area. The argument is brush and the function is brushOpts().

    Note

    A single...