Do it yourself

We already saw fluidPage() being used to set up the environment for other layout functions to work. But this function can also be used to build a UI from scratch, using the fluidRow() function. Using fluidRow() within fluidPage() allows you to implement the standard bootstrap grid layout, as described at w3schools.com/bootstrap/bootstrap_grid_system.asp. Essentially, the interface is built up row by row using the fluidRow() function. Each row can be divided into sections of arbitrary width using the column() function. The column function takes a numeric argument specifying how wide it should be. The total of all of these arguments in a given row should always be 12. So, for example, a row might consist of columns of width 3 and 9, and the following row, perhaps widths of 4, 4, and 4. In this case, a very simple implementation using fluidRow() might look like this:

ui = fluidPage(
fluidRow(
column(width = 4,
sliderInput("slider", "Slider", min = 1, max = 100, value = 50),
textInput("text", "Text")),
column(width = 8,
tableOutput("table")
)
)
)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset