Introducing Shiny Gadgets: Interactive Tools

October 13, 2016 Garrett Grolemund

Download Materials

A Shiny Gadget is an interactive tool that enhances your R programming experience. You make Shiny Gadgets with the same package that you use to make Shiny Apps, but you use Gadgets in a very different way. Where Shiny Apps are designed to communicate results to an end user, Gadgets are designed to generate results for an R user. Each Shiny Gadget returns a value that you can immediately use in your code. You use Shiny Gadgets during the course of your analysis to quickly hone iterative tasks in an interactive fashion. For example, you might use a Shiny Gadget to preview the matches that are generated by a regular expression–as you write the expression. Or you might use a Shiny Gadget to identify high leverage points in your model–as you fit the model. Unlike Shiny Apps, Shiny Gadgets do not need to be deployed on a server. Shiny Gadgets are defined right inside of a regular R function. This is important, because it means that Gadgets can directly access the function’s arguments, and the return value of the Gadget can be the return value for the function. Despite this difference, almost everything you know about Shiny Apps will transfer over to writing Shiny Gadgets.

About the Author

Garrett Grolemund

Garrett is a data scientist and master instructor for RStudio. He excels at teaching, statistics, and teaching statistics. He wrote the popular lubridate package and is the author of Hands On Programming with R and the upcoming book, Data Science with R, from O’Reilly Media. He holds a PhD in Statistics and specializes in Data Visualization.

Follow on Twitter Visit Website More Content by Garrett Grolemund
Previous Video
Data wrangling with R and RStudio
Data wrangling with R and RStudio

Before an R program can look for answers, your data must be cleaned up and converted to a form that makes i...

Next Video
Measure and report test coverage for R, C, C++ and Fortran code in R packages
Measure and report test coverage for R, C, C++ and Fortran code in R packages

measure and report test coverage for R, C, C++ and Fortran code in R packages

×

Please register to receive regular updates on our webinars.

!
Thank you!
Error - something went wrong!