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
Other process_functions:
util_abbreviate()
,
util_all_is_integer()
,
util_attach_attr()
,
util_bQuote()
,
util_backtickQuote()
,
util_coord_flip()
,
util_count_NA()
,
util_extract_matches()
,
util_par_pmap()
,
util_suppress_output()
## 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.