0
我是完全新的閃亮,我不能得到一個textOutput呈現當我想要它。閃亮 - 如何告訴客戶當一個過程完成
observeEvent(input$btnPersistencia, {
output$txtProtActual <- renderText("PROCESSING...")
print("This does print in console")
#SomeCodeHere that takes about 10 seconds to finish
output$txtProtActual <- renderText(paste("Archivo Persistencia Actual: ", basename(values$file), "\n Dim: ", isolate(input$sliderDimension), "\n Filtr: ", isolate(input$txtMaxFil)))
})
#SomeCodeHere正在運行時,文本沒有顯示「Processing ...」。我真的不明白爲什麼。它不應該工作嗎?
該文本僅在observeEvent完成後呈現。我知道這一點,因爲如果我刪除第二個renderText(),當處理結束時,文本將採用值「Processing ...」。
如果這是正常的行爲,有沒有辦法在observeEvent結束之前強制渲染?
編輯:
是否有另一種(任何)方式來實現我想要的?
也許一個進度條? http://shiny.rstudio.com/articles/progress.html – user5029763
發表你的評論作爲一個完整的答案,我會檢查它作爲正確的答案。這正是我想要的。 –