Blocks subsequent r execution until run(s) are finished. This is useful for when subsequent relies on outputs from completed NONMEM jobs. It is normally a good idea to include this in post processing R markdown templates, to ensure they wait for runs to complete before executing.
wait_finish(r, timeout = NA)
An nm object.
Numeric seconds to wait before timeout.
Invisibly returns r
unmodified. Called for side effects.
## requires NONMEM to be installed
if (FALSE) {
# 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"))
m1 %>%
run_nm() %>%
wait_finish()
## following requires run to be completed.
covariance_plot(m1)
}