wait_for | R Documentation |
Will block R console until an expression evaluates to be TRUE
.
wait_for(x, timeout = NULL, interval = 1)
x |
Boolean expression to evaluate. |
timeout |
Numeric. Maximum time (in seconds) to wait. |
interval |
Numeric. The polling interval in seconds (default= |
Invisibly returns TRUE
indicating value of x
after waiting for
x
to be TRUE
.
wait_finish()
.
# create example object m1 from package demo files exdir <- system.file("extdata", "examples", "theopp", package = "NMproject") m1 <- new_nm(run_id = "m1", based_on = file.path(exdir, "Models", "ADVAN2.mod"), data_path = file.path(exdir, "SourceData", "THEOPP.csv")) ## requires NONMEM to be installed ## Not run: ## the following are identical m1 %>% run_nm() %>% wait_finish() wait_for(is_finished(m1)) ## wait_finish is a more convenient form of this ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.