Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(shiny)
- ui <- fluidPage(
- titlePanel("Running Counts!"),
- sidebarLayout(
- sidebarPanel(
- sliderInput(inputId = "bins",
- label = "Select time:",
- min = 1,
- max = nrow(results_mat),
- value = 30)
- ),
- mainPanel(
- plotOutput(outputId = "distPlot")
- )
- )
- )
- server <- function(input, output) {
- output$distPlot <- renderPlot({
- barplot(results_mat[input$bins,],
- main = paste(c("Results at ", rownames(results_mat)[input$bins])))
- })
- }
- shinyApp(ui = ui, server = server)
Add Comment
Please, Sign In to add comment