Executes bbi init ... in specified directory. This creates a bbi.yaml file, which contains defaults for many configurable bbi settings, in that directory.

bbi_init(
  .dir,
  .nonmem_dir,
  .nonmem_version = NULL,
  .bbi_args = NULL,
  .no_default_version = FALSE
)

Arguments

.dir

Path to directory to run init in (and put the resulting bbi.yaml file)

.nonmem_dir

Path to parent directory containing one or more NONMEM installations. See details for more information.

.nonmem_version

Character scalar for default version of NONMEM to use. If left NULL, function will exit and tell you which versions were found in .nonmem_dir

.bbi_args

A named list specifying options to set in the newly created bbi.yaml file, formatted like list("nm_version" = "nm74gf_nmfe", "json" = T, "threads" = 4). Run print_bbi_args() to see valid options. Note that bbr does not support changing the output directory (including through the model or global YAML files).

.no_default_version

If TRUE, force creation of bbi.yaml with no default NONMEM version. FALSE by default, and using TRUE is not encouraged.

Details

For bbr to make any calls out to bbi (for example in submit_model() or model_summary()) it must find a bbi.yaml file. The default behavior is to look for this file in the same directory as the model. submit_model() and submit_models() also support passing a configuration file via the .config_path argument.

Notes on .nonmem_dir

.nonmem_dir should point to the parent directory that contains one or more NONMEM installations. It should not point to the installation directory itself. Here is an example:

    /opt/NONMEM/
    |-- nm74
    |   |-- license
    |   |-- run
    |   |-- source
    |   | ...
    |   `-- util
    `-- nm75
        |-- license
        |-- run
        |-- source
        | ...
        `-- util

/opt/NONMEM/ contains two NONMEM installations, one for NONMEM 7.5 and one for NONMEM 7.4. In this case, you should pass "/opt/NONMEM" as .nonmem_dir and either "nm74" or "nm75" as .nonmem_version.

Examples

if (FALSE) {

# Top-level of NONMEM 7.5 installation is at `/opt/NONMEM/nm75`:

bbi_init(
   .dir = MODEL_DIR,
   .nonmem_dir = "/opt/NONMEM",
   .nonmem_version = "nm75"
)
}