O'Reilly logo

Learning Shiny by Hernán G. Resnizky

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

UI.R partial coding

As it was said before, the input widgets are the first part of the application that must be coded. In this case, almost all the widgets are on the side panel except the selectors that are used in the education-descending line chart and the earnings chi-square test that are in their corresponding tabs. Also, it is recommended to generate the application's frontend structure at this stage. So, the UI.R code that we have so far would be as shown in the following section.

UI.R

As it may be noted, the arguments of the widgets builders are determined dynamically. The reason behind this is exactly the same as in the creation of factor.vars in global.R: avoid hardcoding. Of course, there are some cases (for example, the sex variable) ...

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