At Appsilon we thrive on supporting the open source community with open source packages. As we have already mentioned at various R conferences, the typical cycle of our work is: identification of a repeating programming problem, solving it, wrapping it into a package, testing internally and once we decide it’s useful, happily sharing it with R community. This happened with shiny.semantic first and was followed by the release of shiny.router, shiny.collections, semantic.dashboard and lately shiny.i18n.
Appsilon’s open source family got a new member recently. This time we would like to share with you: shiny.info.
In our daily work, we came across a problem of debugging Shiny apps that often ended with a query: “Oh, but actually what version of the app are you using?”, or “Are you sure that you are in the proper branch?”. You could say there is no problem of checking that with code or with the terminal. But… if you work with a UI expert or you make an A/B test, you’d rather have that information displayed somewhere in your Shiny app rather than switching back and forth to the console.
Shiny.info enables exactly that! It allows developers to display any diagnostic information they need in the div located in the app corner. We created some helper functions for you. For example:
- Display current version of the app from a global variable VERSION. Note the top left corner of the view below.
- Information from git. It returns current repository status, such as branch, last commit and so on…
- Author information. You can easily link to the company or personal website.
Note how easy it is! You just add one line of code anywhere in your Shiny UI code.
Of course, you can display any information you want using the more generic function:
For more examples and documentation details I encourage you to visit the shiny.info GitHub page. Please let us know in the comments what you think about this package. Alternatively you can open Issues or PRs on our repository with any ideas for improvement. The package is still in its infancy, but we hope that it will be immediately useful for Shiny developers. Enjoy and add the info to your apps!
R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more…