Created
April 26, 2020 21:07
-
-
Save drewhoener/55638bf7d7ea707216942541651f6a84 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) | |
library(ggplot2) | |
library(plyr) | |
library(dplyr) | |
data <- read.csv("workbook.csv", stringsAsFactors = FALSE) #subset dataframe to reactive dataframe to input slider | |
ui <- fluidPage( | |
titlePanel("Ambient Particulate Matter"), | |
sidebarLayout( | |
sidebarPanel( | |
sliderInput("sampleInput", "Choose a sample size:", min = 1, max = 134, value = c(25, 100), pre = " ") | |
), | |
mainPanel( | |
plotOutput("coolplot"), dataTableOutput("coolstats"), tableOutput("coolstats2")) | |
) | |
) | |
server <- function(input, output) { | |
output$coolstats <- renderDataTable({ | |
data[input$sampleInput[1]:input$sampleInput[2],] | |
}) | |
} | |
shinyApp(ui, server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment