ui.R

Having examined all the new elements, we can have a look at how Shiny dashboards are put together. As was briefly mentioned previously, Shiny dashboards are composed of three pieces; dashboardHeader(), dashboardSidebar(), and dashboardBody(). They can be put together like this:

dashboardPage(  dashboardHeader([...]),  dashboardSidebar([...]),   dashboardBody([...])) 

Or, they can be put together like this:

# produce componentsheader <- dashboardHeader([...])sidebar <- dashboardSidebar([...])body <- dashboardBody([...])# assembledashboardPage(header, sidebar, body) 

Personally, I have a strong preference for the latter format, since it seems to me to make the code simpler and easier to read (not to mention with less indentation), but you ...

Get Web Application Development with R Using Shiny - Third Edition 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.