library(shiny)
library(DT)
rate <- read_csv("FITB.csv")
# Define UI
ui <- fluidPage(
# Appl title
titlePanel("Fifth Third Stock price"),
# Sidebar with a slider input for number of bins
# dateRangeInput('dateRange',
# label = 'Date range input: yyyy-mm-dd',
# start = 2018-11-12, end = 2019-11-12, min = 2018-11-12, max = 2019-11-12, weekstart = 1
# )
# )
sidebarLayout(
sidebarPanel(dateRangeInput("date_range", label=h3("Date Range"),start="2018-11-12", end="2019-11-12")
),
selectInput("variable", "What do you want to see:",
choices = c("Open", "High", "Low", "Volume")),
actionButton("update", "Update table"),
mainPanel(
tableOutput("table")
)
))
# Define server
server <- function(input, output) {
#output$distPlot <- renderPlot({
# generate dates and table
output$dateRangeText <- renderText({
paste("input$dateRange is",
paste(as.character(input$dateRange), collapse = " to "))})
output$datatable <- renderDT(rate, class = "display nowrap compact", # style
filter = "top") # location of column filters
}
# Run the application
shinyApp(ui = ui, server = server)
I want to have a side panel for date range mentioned above. This is the link to the data table I want Shiny to display when a certain date range is selected. https://finance.yahoo.com/quote/FITB/history/