Shiny Web Applications
Learning objectives: Use shiny to share results on the web.
- basic shiny app
- diagnostics and tracing errors
- modules for larger projects
- widgets
Joe Cheng, guru of Shiny, said the following at the rstudio2017::conf in January 2017:
- Python-based interactive apps mature by added more javascript, which can be challenging; R/Shiny based interactive apps mature with tools in R, with the javascript and HTML hidden in R helper functions.
- Shiny server mimics the 2-way client/server functionality by embedding a small server in your brower during use; that helps keep track of the messages back and forth, and protects against connection failure. Shiny server works better with https than http, as the encryption protects the shiny packets from corruption by the browser.
Examples from Gallery
References
- Contributions
Building blocks for shiny
Miscellaneous
- dynamic input example
- include Rmarkdown in shiny app:
includeHTML(rmarkdown::render("myfile.Rmd")) - d3 and shiny
- Binding d3 to shiny
- Shiny d3 plot
- d3 Shiny Integration ⚠️ Network Visualization
Debugging Shiny
- options(shiny.reactlog=TRUE) ⚠️ then `command`-`fn`-`F3`
cat(file=stderr(), ...)options(shiny.error=browser)- Web browser: right-click inspect element
- JavaScript Dev mode
OSX - Brian Yandell stuff
Advanced tools (javascript, updated URLs, widgets)
- ShinyURL
- Custom objects
-
Karl Broman’s Horizon Notes on Making Horizon