wait_finish: Wait for runs to finish

View source: R/monitoring.R

wait_finishR Documentation

Wait for runs to finish

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

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


## 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)


tsahota/NMproject documentation built on Oct. 1, 2022, 11:51 a.m.