1
I’m developing a Shiny app, where I have several actionButtons
which, when clicked, execute other codes through the function source
or render
according to the following example:
library(shiny)
library(rmarkdown)
library(shinythemes)
ui <- fluidPage(
#tema
theme = shinytheme("darkly"),
navbarPage(title = "exemplo",
# painél para relatório ---------------------------------------------------
tabPanel("relatorio",
#relatório de movimentações
actionButton("teste", "teste"),
#relatório de passivo
#relatório de passivo
actionButton("teste2", "teste2")
)
)
)
server <- function(input, output, session) {
# relatórios --------------------------------------------------------------
#render relatório de movimentacao
observeEvent(input$teste, {
render("endereço do arquivo Rmarkdown no computador",output_file = "teste" ,output_dir = "pasta de saida no computador")
})
observeEvent(input$teste2, {
source("endereço do código em R no computador")
})
}
shinyApp(ui, server)
My problem is that when I run the reports through Rmarkdown or source, the codes are running correctly, but I cannot know when the code was completed so I can use another application function
I would like to know how to put a code completion message and make the application Shiny end the actionButton
so I can use another actionButton
very good, thanks for the help
– Henrique Faria de Oliveira