library(shiny)
# ui ##########################
ui <- fluidPage(
fileInput("csv", label="",
multiple = TRUE,
accept = c("text/csv", ".csv")),
tags$hr(),
actionButton("show.tbl", "SHOW TABLE"),
tableOutput("my_tbl")
)
# server #########################
server <- function(input, output) {
tbl <- data.frame(Example = LETTERS[1:10]) # will be reactive in reality
output$my_tbl <- renderTable({
if(input$show.tbl == 1)
tbl
})
}
# app ######################
shinyApp(ui, server)
How can I reactively add actionButtons to the tableOutput?