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) ...

Get Learning Shiny now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.