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 completion

The only thing remaining to do in order to have a fully functional application is display the outputs in UI.R. As it was explained before, each render variable has a corresponding output counterpart. Back to our example, as explained in the following sections this is how UI.R is completed.

UI.R

As it has been explained, every output name corresponds to an object in the output list created in server.R:

library(shiny) # Starting line shinyUI(fluidPage( # Application title titlePanel("Adult Dataset"), sidebarLayout( # Sidebar sidebarPanel( h1("Gender"), checkboxGroupInput("gender", "Choose the genders", choices = levels(data.adult$sex), selected = levels(data.adult$sex)), h1("Age"), sliderInput("minage", "Select lower limit", min(data.adult$age), ...

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