i need shiny app. i'll try simplify question. problem i'm developing application makes report when button pressed. report takes between 10 , 15 minutes. have button (a 'stop' button) stops previous process doesn't stop application. ilustrate that, i'll show code can take reference resolve app. counting started pressing @ 'count' button, stops if press 'stop' button.
ui.r code:
shinyui( fluidpage( actionbutton("count","start count"), actionbutton("stop","stop count") ) ) server.r code:
shinyserver(function(input, output, session) { observeevent(input$count, { observeevent(input$stop, { # code stop counting }) <- 1 (i in i:10000) { print(paste("number: ",i)) } }) }) thanks lot friends!
Comments
Post a Comment