Shiny is a product created and supported by Posit.co, formerly known as Rstudio. They have their own support forum here <https://posit.co/support/> , which is likely a better place to post such queries.
Cheers, Bert On Tue, May 30, 2023 at 6:58 AM Cleber Borges via R-help < r-help@r-project.org> wrote: > Hello everybody > > I tried closing a shiny session with the call: session$close() and then > I found that it didn't do what I thought it would. > > The result of calling: session$isClosed() is still FALSE. > > Does anyone have any tips on how to close the shiny session using a button? > > Thanks in advance for any help > > yours sincerely., > > Cleber Borges > > ----------------------- CODE---------------------------- > > ui <- fluidPage( actionButton( "disconnect", "disconnect" ) ) > > server <- function( input, output, session ) { > observeEvent( input$disconnect, { > session$close() > res <- session$isClosed() > print( paste0( "result of function isClosed() is: ", res ) ) > }) > } > > shinyApp( ui, server ) > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.