Skip to content

Instantly share code, notes, and snippets.

@wch
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wch/9669225 to your computer and use it in GitHub Desktop.
Save wch/9669225 to your computer and use it in GitHub Desktop.
Vertical layout example for R Shiny

Each item passed to verticalLayout() will occupy a row. This is similar to fluidRow(), except that fluidRow() expects there to be one or more column()s inside, whereas vertcialLayout() does not; each item takes a full row.

Type: Shiny
Title: Vertical Layout
License: MIT
Author: Winston Chang <winston@rstudio.com>
AuthorUrl: http://www.rstudio.com/
Tags: vertical-layout
DisplayMode: Showcase
shinyServer(function(input, output) {
output$plot1 <- renderPlot({
plot(x = rnorm(input$n), y = rnorm(input$n))
})
})
shinyUI(fluidPage(
verticalLayout(
titlePanel("Vertical layout example"),
plotOutput("plot1"),
wellPanel(
sliderInput("n", "Number of points", 10, 200,
value = 50, step = 10)
)
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment