Could you help me link an excel database to my downloadLink? Therefore, whenever I click on "Download the standard base" in shiny, an excel database is automatically downloaded. I made a minimal example below just to show the idea. I don't know how to adjust it on my server for this to work correctly.
Thank you!
library(shiny)
ui <- fluidPage(
titlePanel("Old Faithful Geyser Data"),
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
value = 30),
downloadLink("standarddatabase", h4("Download the standard base")),
),
mainPanel(
plotOutput("distPlot")
)
)
)
server <- function(input, output) {
output$distPlot <- renderPlot({
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
}
shinyApp(ui = ui, server = server)