View source: R/util_setup_rstudio_job.R
util_setup_rstudio_job | R Documentation |
Also defines a progress function and a progress_msg
function in
the caller's environment.
util_setup_rstudio_job(job_name = "Job")
job_name |
a name for the job |
In RStudio
its job system will be used, for shiny::withProgress
based calls, this will require min and max being set to 0 and 1 (defaults).
If cli
is available, it will be used, in all other cases, just message
s
will be created.
list: the progress
function and the progress_msg
function
## Not run:
test <- function() {
util_setup_rstudio_job("xx")
Sys.sleep(5)
progress(50)
progress_msg("halfway through")
Sys.sleep(5)
progress(100)
Sys.sleep(1)
}
test()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.