Last active
August 29, 2015 14:15
-
-
Save Nicolabo/541080433605ede7fb36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
shinyServer(function(input, output) { | |
output$distPlot <- renderPlot({ | |
x <- faithful[, 2] # Old Faithful Geyser data | |
bins <- seq(min(x), max(x), length.out = input$bins + 1) | |
hist(x, breaks = bins, col = 'darkgray', border = 'white') | |
}) | |
output$distPlot2 <- renderPlot({ | |
x <- faithful[, 2] # Old Faithful Geyser data | |
bins <- seq(min(x), max(x), length.out = input$bins + 1) | |
hist(x, breaks = bins, col = 'darkgray', border = 'white') | |
}) | |
}) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
shinyUI( | |
fluidPage( | |
fluidPage( | |
titlePanel("Introduction"), | |
column(12, | |
p("Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin | |
nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel | |
lorem. Etiam pellentesque aliquet tellus. Phasellus pharetra nulla | |
ac diam. Quisque semper justo at risus. Donec venenatis, turpis vel | |
hendrerit interdum, dui ligula ultricies purus, sed posuere libero | |
dui id orci. Nam congue, pede vitae dapibus aliquet, elit magna | |
vulputate arcu, vel tempus metus leo non est. Etiam sit amet lectus | |
quis est congue mollis. Phasellus congue lacus eget neque. Phasellus | |
ornare, ante vitae consectetuer consequat, purus sapien ultricies | |
dolor, et mollis pede metus eget nisi. Praesent sodales velit quis | |
augue. Cras suscipit, urna at aliquam rhoncus, urna quam viverra nisi, | |
in interdum massa nibh nec erat.")) | |
), | |
fluidPage( | |
titlePanel("Plot1"), | |
sidebarLayout( | |
sidebarPanel( | |
sliderInput("bins", | |
"Number of bins:", | |
min = 1, | |
max = 50, | |
value = 30) | |
), | |
mainPanel( | |
plotOutput("distPlot") | |
) | |
) | |
), | |
fluidPage( | |
titlePanel("Plot2"), | |
sidebarLayout( | |
sidebarPanel( | |
sliderInput("bins", | |
"Number of bins:", | |
min = 1, | |
max = 50, | |
value = 30) | |
), | |
mainPanel( | |
plotOutput("distPlot2") | |
) | |
) | |
)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment