util_setup_rstudio_job {dataquieR} | R Documentation |
Set up an RStudio job
Description
Also defines a progress function and a progress_msg
function in
the caller's environment.
Usage
util_setup_rstudio_job(job_name = "Job")
Arguments
job_name |
a name for the job |
Details
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.
Value
list: the progress
function and the progress_msg
function
See Also
Other process_functions:
util_abbreviate()
,
util_all_is_integer()
,
util_attach_attr()
,
util_bQuote()
,
util_backtickQuote()
,
util_coord_flip()
,
util_extract_matches()
,
util_par_pmap()
,
util_suppress_output()
Examples
## 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)
[Package dataquieR version 2.5.1 Index]