Posts List

Deploying Shiny Apps

Shiny apps are a very convenient way of sharing your work with others, especially with non-technical co-workers. The best way is to deploy your app somewhere on the internet (or intranet), so the user won’t need to install R, packages, and other stuff, let alone the need for easy updates. There’re a few ways to host your applications, and all of them comes with some pros and cons: Shinyapps http://www.shinyapps.io/ The most natural solution is to put your app on the shinyapps.

Dynamic modules in shiny - Part II

In the previous post about shiny modules, I described how to dynamically add new modules, or even select a module type from a few possibilities. The main problem was that the new module is added inside an observer function, so we cannot directly get the returned value of the new modules. However, we can solve this problem quite easily using reactiveValues. We just add a parameter to the module’s server function in which we will send the reactive value used to communicate between the main application and the module.

dragulaR with renderUI

Quite recently someone asked about if it’s possible to use my dragulaR (https://github.com/zzawadz/dragulaR) package with renderUI. My first thought was that this might be quite hard. I knew that insertUI is not a problem because you can set ‘immediate = TRUE’ parameter, and just after that use ‘js$refreshDragulaR(“dragula”)’ to refresh the dragula container. However, with insertUI you cannot simply use refreshDragulaR, because it must be called when all the elements in the uiOutput are ready, and this is not so easy to do so.

Dynamic modules in shiny - Part I

The best way to organize shiny app is to use modules. They are also an excellent choice when you need to replicate some functionality few times. For example, when you want to compare some plots with different parameters, the modules are your way to go. In basic usage, modules require a direct call of callModule in a server and a place in UI. However, sometimes you don’t know how many instances of a given module are needed.

Drag and Drop in Shiny

Shiny application is a great way to deliver the result of statistical analysis, especially when it must be reproducible. I don’t know why, but people prefer to use graphic interface, rather than run scripts;) One of my clients recently requested to have an ability to move around elements in the dashboard. There are some R packages to attain such effect, and possibly it would be a bit easier to use them, but I had an unfinished project called dragulaR.