Guest User

Untitled

a guest
Dec 27th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. library(shiny)
  2. ui <- fluidPage(
  3.  
  4. titlePanel("Running Counts!"),
  5.  
  6. sidebarLayout(
  7.  
  8. sidebarPanel(
  9.  
  10. sliderInput(inputId = "bins",
  11. label = "Select time:",
  12. min = 1,
  13. max = nrow(results_mat),
  14. value = 30)
  15. ),
  16. mainPanel(
  17. plotOutput(outputId = "distPlot")
  18. )
  19. )
  20. )
  21. server <- function(input, output) {
  22.  
  23. output$distPlot <- renderPlot({
  24.  
  25. barplot(results_mat[input$bins,],
  26. main = paste(c("Results at ", rownames(results_mat)[input$bins])))
  27. })
  28. }
  29. shinyApp(ui = ui, server = server)
Add Comment
Please, Sign In to add comment