O'Reilly logo

RStudio for R Statistical Computing Cookbook by Andrea Cirillo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing a Shiny app UI based on user input

Employing tools acquired in the previous recipe, you will be able to go quite far exploring Shiny's possibilities.

However, there is a quite advanced topic that was excluded from the previous recipe: UI customization based on user input.

This is an amazing feature, and it is even more amazing if you think you don't have to learn JavaScript or any other language to apply it to your app. Only R code knowledge is needed. Our app will ask for a first question and consequently change the possible answers to a second question.

One last word; our app will be based on the Lord of the Rings characters. I hope you will appreciate this. Now, let's start without any ado; as Samwise Gamgee would say:

"It's the job that's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required