Skip to content
Snippets Groups Projects
Commit a8368f4e authored by thierrychambert's avatar thierrychambert
Browse files

Added progress bar (library : ipc)

parent 5d6a7925
No related branches found
No related tags found
No related merge requests found
......@@ -1756,6 +1756,7 @@ server <- function(input, output, session){
progress <- AsyncProgress$new(session, min=1, max=nsim, message = "Simulation progress")
##--------------------------------------------
# Start Loops over simulations --
......@@ -1766,6 +1767,8 @@ server <- function(input, output, session){
## Loops now ##
for(sim in 1:nsim){
## Progress bar
progress$set(value = sim)
Sys.sleep(0.1)
# Check for user interrupts
......@@ -1893,6 +1896,9 @@ server <- function(input, output, session){
} # sim ##-----------------------------------------------------------------------------------------
progress$close()
# As result
N
......@@ -1900,13 +1906,6 @@ server <- function(input, output, session){
###################################################
################################
## run_simul ends here ##
################################
# Catch inturrupt (or any other error) and notify user
result <- catch(result,
function(e){
......
......@@ -17,6 +17,7 @@ rm(list = ls(all.names = TRUE))
library(promises)
library(future)
library(ipc)
plan(multisession)
options(knitr.table.format = "latex")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment