Helper to extract the path to the input data from a bbi object.

get_data_path(.bbi_object, .check_exists = TRUE, ...)

# S3 method for bbi_model
get_data_path(.bbi_object, .check_exists = TRUE, ...)

# S3 method for bbi_nonmem_model
get_data_path(.bbi_object, .check_exists = TRUE, ...)

# S3 method for bbi_nonmem_summary
get_data_path(.bbi_object, .check_exists = TRUE, ...)

# S3 method for bbi_log_df
get_data_path(.bbi_object, .check_exists = TRUE, ...)

Arguments

.bbi_object

The object to query. Could be a bbi_{.model_type}_model object, bbi_{.model_type}_summary object, or a tibble of class bbi_log_df.

.check_exists

If TRUE, the default, will throw an error if the file does not exist

...

Arguments passed through to methods. (Currently none, but may have some modifier arguments other model types in the future.)

Value

Absolute path to input data file

Notes on NONMEM model extensions

Before executing the model, bbi first copies the control stream file to a subdirectory. Whether a relative path to the data file in the control stream is adjusted for this change in directory depends on the control stream's file extension:

  • For a model with a .mod extension, bbi automatically adjusts a relative data path to make it relative to the execution directory, following the behavior of PsN.

  • For a model with a .ctl extension, bbi does not adjust the data path. A relative data path in the control stream must be specified one level deeper (i.e. with an additional ../) to account for the model being executed in a subdirectory.