I have started using R shiny recently and what I noticed is that code both in ui.R and server.R tend to become hard to read very quickly. This is mostly due to the nested calls to create the HTML structure, the switches to implement conditional panels etc...
Is there a tool that with which I can write lighter and more readable code that will produce the desired server.R and ui.R? I am thinking of something similar to CoffeeScript that compiles in Javascript or Jade that compiles in HTML. We've tried R markdown but we are not convinced.
Or maybe this can be easily achieved with some simple good practice. However, this seems hard to export some calls out of the shinyUI and shinyServer without breaking shiny reactiveness.
Any guidance would be greatly appreciated