Using progressbar in R shiny is quite straightforward when it comes within the server function :
library(shiny) source(myFunctions.R) shinyServer(function(input, output) { withProgress(message = 'Chargement des données', value = 0, { incProgress(0.5) function1() incProgress(0.6) function2() incProgress(0.7) function3() incProgress(0.8) }) }) But what if I want to have them inside a function, for instance:
Allfunction <- function(){ withProgress(message = 'Chargement des données', value = 0, { incProgress(0.5) function1() incProgress(0.6) function2() incProgress(0.7) function3() incProgress(0.8) }) } and hence
shinyServer(function(input, output) { Allfunction() }) Then I get
Warning: Error in withProgress: 'session' is not a ShinySession object. and adding a session argument to the function, as advertised on a google forum did'nt do it.