Throughout these code examples, we're going to have a very simple server.R file, which will not change. It simply draws a table and nothing else. We will therefore also break the habit of the rest of this book and use the single app.R file structure for these examples, since they are so small. With that in mind, let's look at the first application, which will be flowLayout():
server = function(input, output) { output$table = renderTable({ head(iris) })}ui = flowLayout( sliderInput("slider", "Slider", min = 1, max = 100, value = 50), textInput("text", "Text"), tableOutput("table"))shinyApp(ui, server)
In flowLayout, elements are ordered left to right, top to bottom. Resizing the window causes the elements to reorder themselves so ...