Skip to content

Instantly share code, notes, and snippets.

@jean-robert
Created November 11, 2013 16:20
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 jean-robert/7415885 to your computer and use it in GitHub Desktop.
Save jean-robert/7415885 to your computer and use it in GitHub Desktop.
Vertical align test for Shiny
library(shiny)
shinyServer(function(input, output) {
output$distPlot <- renderPlot({
dist <- rnorm(input$obs)
hist(dist)
})
output$distPlot2 <- renderPlot({
dist <- runif(input$obs)
hist(dist)
})
})
library(shiny)
shinyUI(pageWithSidebar(
headerPanel("Vertical alignment test"),
sidebarPanel(
sliderInput("obs",
"Number of observations:",
min = 1,
max = 1000,
value = 500)
),
mainPanel(
div(class='row',
div(class='span6', plotOutput("distPlot")),
div(class='span6', plotOutput("distPlot2")))
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment