wait_finish: Wait for runs to finish

Description Usage Arguments Value Examples

View source: R/monitoring.R

Description

[Stable]

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.

Usage

1
wait_finish(r, timeout = NA)

Arguments

r

An nm object.

timeout

Numeric seconds to wait before timeout.

Value

Invisibly returns r unmodified. Called for side effects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## requires NONMEM to be installed

## Not run: 
# 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)

## End(Not run)

NMproject documentation built on Oct. 18, 2021, 1:08 a.m.