R and Shiny: Lessons from v0.1 of my first app

I'm building my first app in Shiny and besides the basics, there's already two things I've learned that I feel are worth putting down.

  • If you want your dropdown menu to use information that's calculated by the server.ui, you'll need to use the uiOutput function as shown by Dean Attali in his great Shiny guide. You can't just do the regular input method.

  • And if you're using uiOutput, then there'll be an error that appears and disappears because the plot can't be built till the dropdown menu is populated. So, you'll have to add a tiny IF statement to avoid the error. Attali shows you how to do that as well.

Reactivity was supposed to be the tricky concept that I'd have to learn but so far I haven't had any trouble with it. Shiny seems great and relatively simple.